MCPcopy Index your code
hub / github.com/aurora-develop/Duck2api

github.com/aurora-develop/Duck2api @v2.1.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.1.6 ↗ · + Follow
110 symbols 248 edges 22 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

duck2api

Deploy

编译部署

git clone https://github.com/aurora-develop/duck2api
cd duck2api
go build -o duck2api
chmod +x ./duck2api
./duck2api

Docker部署

Docker部署

您需要安装Docker和Docker Compose。

docker run -d \
  --name duck2api \
  -p 8080:8080 \
  ghcr.io/aurora-develop/duck2api:latest

Docker Compose部署

创建一个新的目录,例如duck2api,并进入该目录:

mkdir duck2api
cd duck2api

在此目录中下载库中的docker-compose.yml文件:

docker-compose up -d

Usage

curl --location 'http://你的服务器ip:8080/v1/chat/completions' \
--header 'Content-Type: application/json' \
--data '{
     "model": "gpt-4o-mini",
     "messages": [{"role": "user", "content": "Say this is a test!"}],
     "stream": true
   }'

支持的模型

  • ~~gpt-3.5-turbo~~ duckduckGO官方已移除3.5模型的支持
  • claude-3-haiku
  • llama-3.3-70b
  • mixtral-8x7b
  • gpt-4o-mini
  • o3-mini

高级设置

默认情况不需要设置,除非你有需求

环境变量


Authorization=your_authorization  用户认证 key。
TLS_CERT=path_to_your_tls_cert 存储TLS(传输层安全协议)证书的路径。
TLS_KEY=path_to_your_tls_key 存储TLS(传输层安全协议)证书的路径。
PROXY_URL=your_proxy_url 添加代理池来。

鸣谢

感谢各位大佬的pr支持,感谢。

参考项目

https://github.com/xqdoo00o/ChatGPT-to-API

License

MIT License

Extension points exported contracts — how you extend this code

AuroraHttpClient (Interface)
(no doc) [1 implementers]
httpclient/Iaurorahttpclient.go

Core symbols most depended-on inside this repo

Set
called by 43
httpclient/Iaurorahttpclient.go
String
called by 13
typings/official/response.go
SetProxy
called by 6
httpclient/Iaurorahttpclient.go
Request
called by 5
httpclient/Iaurorahttpclient.go
jsErrorString
called by 3
internal/duckgo/vqd.go
createHeader
called by 3
internal/duckgo/request.go
NewStdClient
called by 3
httpclient/bogdanfinn/tls_client.go
RegisterRouter
called by 2
initialize/router.go

Shape

Function 55
Struct 34
Method 17
TypeAlias 2
FuncType 1
Interface 1

Languages

Go100%

Modules by API surface

typings/official/response.go22 symbols
internal/duckgo/request.go14 symbols
initialize/handlers.go10 symbols
typings/official/request.go9 symbols
typings/duckgo/request.go8 symbols
httpclient/bogdanfinn/tls_client.go8 symbols
internal/duckgo/vqd.go6 symbols
httpclient/Iaurorahttpclient.go6 symbols
internal/proxys/proxys.go4 symbols
httpclient/bogdanfinn/tls_client_test.go4 symbols
util/util.go3 symbols
conversion/requests/duckgo/convert.go3 symbols

For agents

$ claude mcp add Duck2api \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact