Skip to content

Commit

Permalink
Merge pull request #7 from aurora-develop/yjmp14-main
Browse files Browse the repository at this point in the history
Update duckgo convert.go to support Llama-3-70b and Mixtral-8x7B models
  • Loading branch information
xiaozhou26 authored Jun 10, 2024
2 parents e80698d + 0269180 commit 06cf9b5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GHCR_PAT }}
with:
tag_name: v2.0.9
tag_name: v2.1.0
files: |
duck2api-linux-amd64.tar.gz
duck2api-windows-amd64.tar.gz
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ curl --location 'http://你的服务器ip:8080/v1/chat/completions' \
"stream": true
}'
```
支持claude和gpt-3.5-turbo
## 支持的模型
claude和gpt-3.5-turbo,Llama-3-70b,Mixtral-8x7B等模型
## 高级设置

默认情况不需要设置,除非你有需求
Expand Down
8 changes: 8 additions & 0 deletions conversion/requests/duckgo/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ func ConvertAPIRequest(api_request officialtypes.APIRequest) duckgotypes.ApiRequ
if strings.HasPrefix(strings.ToLower(api_request.Model), "claude") {
duckgo_request.Model = "claude-3-haiku-20240307"
}
if strings.HasPrefix(strings.ToLower(api_request.Model), "Llama-3-70b") {

duckgo_request.Model = "meta-llama/Llama-3-70b-chat-hf"
}
if strings.HasPrefix(strings.ToLower(api_request.Model), "Mixtral-8x7B") {

duckgo_request.Model = "mistralai/Mixtral-8x7B-Instruct-v0.1"
}
content := buildContent(&api_request)
duckgo_request.AddMessage("user", content)
return duckgo_request
Expand Down

0 comments on commit 06cf9b5

Please sign in to comment.