Skip to content

[FEATURE]支持自定义 OpenAI 格式的 API 和自定义模型 #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
LucienShui opened this issue Mar 22, 2024 · 10 comments
Closed

Comments

@LucienShui
Copy link

MaxKB 版本

v0.9.0 (build at 2024-03-21T18:39, commit: 96a0e4b)

请描述您的需求或者改进建议

现在只支持添加 Azure OpenAI 的 API,以及基础模型只能选 gpt-3.5-turbo 系列和 gpt-4-0613

建议增加 OpenAI 格式的自定义模型,并且将基础模型改为自由输入而不是下拉框。毕竟llama.cppvllm等开源项目更广泛地支持的是 OpenAI 的 API 格式。

Reference: platform.openai.com

请描述你建议的实现方案

No response

附加信息

No response

@baixin513
Copy link
Contributor

您好,当前 Ollama 平台的基础模型支持自定义输入。
Azure OpenAI 和千帆大模型还不支持自定义输入是因为不同模型入参可能会不一致,所以暂时还没放开自定义输入。

@beijingtl
Copy link

beijingtl commented Mar 23, 2024

可以增加自定义的输入,基于支持1panel中的One API,自定义域名、API KEY

@LucienShui
Copy link
Author

您好,我看在 0.9.1 的版本中标记此 feature request 为已完成,但是更新软件后查看网页、查看源代码,均没有看见我与 @beijingtl 希望的形式。

我将提供一个 PR 以实现此功能。

@LucienShui
Copy link
Author

您好,我看在 0.9.1 的版本中标记此 feature request 为已完成,但是更新软件后查看网页、查看源代码,均没有看见我与 @beijingtl 希望的形式。

我将提供一个 PR 以实现此功能。

对不起,看了代码结构和复杂度之后放弃了,坐等官方实现吧。

参考 https://github.com/geekan/MetaGPT 的实现:

llm:
  api_type: "openai"  # or azure / ollama / open_llm etc. Check LLMType for more options
  model: "gpt-4-turbo-preview"  # or name of your self-hosted model, like gemma or qwen
  base_url: "https://api.openai.com/v1"  # or forward url / other llm url
  api_key: "YOUR_API_KEY"

@baixin513
Copy link
Contributor

baixin513 commented Mar 27, 2024

你好,OpenAI 目前还不支持对接。我再改回一下状态。
v0.9.1版本的Azure OpenAI 的基础模型可以自定义输入,输入后回车,会要求输入 api_version 参数。
image

@jingzl
Copy link

jingzl commented Apr 4, 2024

问题在最新的版本中似乎还没有解决啊?
如何设置本地服务器部署的openai接口的模型呢?比如chatglm3-6b?

@yyrg020610
Copy link

多轮对话好像用不了啊

@baixin513
Copy link
Contributor

问题在最新的版本中似乎还没有解决啊? 如何设置本地服务器部署的openai接口的模型呢?比如chatglm3-6b?

支持通过 Ollama 部署的本地化模型,但 Ollama 还不支持chatglm3-6b ,所以我们目前也不支持chatglm3-6b。

@baixin513
Copy link
Contributor

多轮对话好像用不了啊

多轮对话开启后会携带历史的 3 次对话作为上下文向大模型提问。

@liyunhan
Copy link

liyunhan commented May 7, 2024

现在支持openai格式的api了吗,我们的qwen1.5-72b-chat是用vllm做的服务,所有的访问都是基于这个展开的。以及,后端的检索可以自行替换吗?我们自己用的bge和bm25做的定制化检索..

honestAnt pushed a commit to honestAnt/MaxKB that referenced this issue Apr 2, 2025
…lop)

Merge Request: feat:添加poetry镜像,节省打包时间2

Created By: @王凤宝
Accepted By: @王凤宝
URL: https://megarobo-biolauto.coding.net/p/github/d/maxkb/git/merge/9?initial=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants