Skip to content
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

👑 [需求]对于在线模型,只需要添加一个token #33

Open
yuruotong1 opened this issue Jul 14, 2024 · 1 comment
Open

👑 [需求]对于在线模型,只需要添加一个token #33

yuruotong1 opened this issue Jul 14, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@yuruotong1
Copy link
Owner

提供一个支持的模型供应商的列表供人选择 对于在线模型,只需要添加一个token就好,token的申请肯定各家都有详细的文档,而具体的和模型的交互,完全可以后端负责去处理转换 。

@yuruotong1 yuruotong1 added the enhancement New feature or request label Jul 14, 2024
@casuallyName
Copy link

可以在后端添加一个获取支持的模型入口列表的接口,返回如下信息,前端依据此信息展示配置页面的选项。
同时在和后端交互(/llm接口)时传递msgenter_idparameters的配置内容(或存入数据库,后端由数据库直接读取),由后端自读判断使用哪一个入口完成会话。

[
    {
        "enter_id": "OpenaiEnterPoint",
        "name": "OpenAI",
        "parameters": {
            "api_key": {
                "default": null,
                "name": "API KEY",
                "required": true,
                "typing": "string"
            },
            "base_url": {
                "default": "https://api.openai.com/v1/engines/davinci/completions",
                "name": "Base URL",
                "required": false,
                "typing": "string"
            },
            "model_name": {
                "default": "gpt-3.5-turbo",
                "name": "模型名称",
                "required": false,
                "typing": "string"
            }
        }
    },
    {
        "enter_id": "QwenEnterPoint",
        "name": "通义千问",
        "parameters": {
            "api_key": {
                "default": null,
                "name": "Token",
                "required": true,
                "typing": "string"
            },
            "model_name": {
                "default": "qwen2-7b-instruct",
                "name": "模型名称",
                "required": false,
                "typing": "string"
            }
        }
    },
    {
        "enter_id": "VLLMEnterPoint",
        "name": "VLLM",
        "parameters": {
            "api_key": {
                "default": null,
                "name": "API KEY",
                "required": false,
                "typing": "string"
            },
            "base_url": {
                "default": null,
                "name": "Base URL",
                "required": true,
                "typing": "string"
            },
            "model_name": {
                "default": null,
                "name": "模型名称",
                "required": true,
                "typing": "string"
            }
        }
    }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants