- Notifications
You must be signed in to change notification settings - Fork8
DuckDuckGo AI to OpenAI API
License
NotificationsYou must be signed in to change notification settings
0x676e67/duckai
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
🚀 Support my journey to full-time open-source development bysponsoring me on GitHub
DuckDuckGo AI to OpenAI API
- API authentication
- Support IP proxy pool
- Built-in Http connection pool
- Streaming/non-streaming API
Model mapping, unsupported models default togpt-4o-mini
- gpt-4o-mini ->
gpt-4o-mini
- claude-3-haiku ->
claude-3-haiku-20240307
- llama-3.1-70b ->
meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo
- mixtral-8x7b ->
mistralai/Mixtral-8x7B-Instruct-v0.1
curl --request POST'http://127.0.0.1:8080/v1/chat/completions' \ --header'Content-Type: application/json' \ --data'{ "messages": [ { "role": "user", "content": "Rust example." } ], "model": "gpt-4o-mini", "stream": true }'
$ duckai -hDuckDuckGo AI to OpenAIUsage: duckai duckai<COMMAND>Commands: run Run server start Start server daemon restart Restart server daemon stop Stop server daemon log Show the server daemon log ps Show the server daemon process gt Generate config template file (yaml format file)help Print this message or thehelp of the given subcommand(s)Options: -h, --help Printhelp -V, --version Print version$ duckai run -hRun serverUsage: duckai run [CONFIG_PATH]Arguments: [CONFIG_PATH] Configuration filepath [default: duckai.yaml]Options: -h, --help Printhelp
If you need more detailed installation and usage information, please check here
- Install
- cargo
cargo install duckai
- Dokcer
docker run --rm -it -p 8080:8080 ghcr.io/penumbra-x/duckai:latest run
- Compile
# Required install dockercargo install crosscross build --target x86_64-unknown-linux-musl --releasecross build --target aarch64-unknown-linux-musl --release
- Generate config template file
duckai gt# Generate duckai.yaml file (current directory)
# Debug modedebug:false# Listen addressbind:0.0.0.0:8080# Client timeouttimeout:60# Client connect timeoutconnect_timeout:10# Client tcp keepalivetcp_keepalive:90# Maximum tcp connectionconcurrent:100# Proxy poolproxies:-!urlhttp://127.0.0.1:6152-!urlsocks5://127.0.0.1:6153-!cidr2001:470:e953::/48-!iface192.168.1.10# Enable TLStls_cert:nulltls_key:null# API keyapi_key:null
- Proxy pool
IP
proxy pool type supports three types (priority:CIDR
>Proxy
>Interface
, using round-robin strategy):
URL
,protocol supports:http
/https
/socks4
/socks5
/socks5h
Interface
,bind local network interface addressCIDR
,supportIPv4
/IPv6
subnet, the premise is that the subnet routes are normally communicable
If you want to submit contributions, please openPull Request
Your questions may have been answered inissues
About
DuckDuckGo AI to OpenAI API
Topics
Resources
License
Stars
Watchers
Forks
Packages0
No packages published