Open
Conversation
|
我看了一下这个Gitee.AI 网站,没找到openai 的模型 |
Author
是的。所以我提的代码里面增加的是gitee上的国内服务商,我用了deepseek-v3,openai的模型咱们这儿用起来不是不太方便吗 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
您好!感谢您查看本PR,本次修改主要目的是为国内开发者的便利,仅仅添加了Gitee.AI必需的配置,并非替换OpenAI。首先解答一下您的疑惑,为什么LiteLLM也支持对接多种格式的API我还要做修改。我通过查阅LiteLLM官方文档发现Gitee AI不在其官方支持Provider列表中,所以LiteLLM无法仅从URL自动判断应该用哪种API格式,因此需显式传递 custom_llm_provider 参数以确保格式正确,也就是告诉LiteLLM我所用的Gitee AI是兼容Open AI的,我所做的这一步骤并不影响您原先的逻辑:通过 base_url 自动识别为OpenAI兼容格式。
再说一下我为什么要做这样的修改,网络限制国内开发者无法直接访问OpenAI API,Gitee AI是一个国内的API提供商,并且底层集成的是国产GPU,比如沐曦“曦云 C500”,将您的项目适配Gitee AI,将能为使用国产Serverless API 服务的使用者提供非常优秀的学习案例,能够支持国内AI技术生态的持续发展。诚恳希望您能考虑一下我的请求,非常乐意再次配合修改。