各家服务商都提供自身SDK和兼容openai的地址,其中值得注意的是并不是所有模型都可以兼容openai,具体看文档.
云服务商 | 兼容openai地址base_url | 服务商SDK |
---|---|---|
阿里百炼 | https://dashscope.aliyuncs.com/compatible-mode/v1 | dashscope |
deepseek | https://api.deepseek.com/v1 或者 https://api.deepseek.com | |
火山方舟 | https://ark.cn-beijing.volces.com/api/v3 | volcengine-python-sdk[ark] |
腾讯混元 | https://api.hunyuan.cloud.tencent.com/v1 | |
ollama | http://your-ip-address:11434 |
OpenAPI spec –> https://github.com/openai/openai-openapi