latorc / Wechat-AI-Assistant

微信AI助理 (Wechat AI Assistant): 在微信中与 AI 助理进行多模态交互, 处理问答、扮演角色、响应语音消息、分析图片和视频、总结文章和网页链接、搜索互联网等等。现支持 OpenAI Assistant API 和 GPT-4o模型。
MIT License
129 stars 18 forks source link

和oneapi结合一直显示模型无可用渠道 #4

Open flyinsz opened 5 months ago

flyinsz commented 5 months ago

如题,我已再三确认模型是存在的。

配置如下:

openai:

OpenAI 相关配置。OpenAI管理后台: https://platform.openai.com/api-keys

api_key:

base_url: # API的网址。原版API使用默认值: https://api.openai.com/v1

api_key: sk-zytscKkrg06aExzG41F898Ef82F046Ea8bAd51Bb82D5280f base_url: http://localhost:3002/v1 proxy: # 代理服务器地址。格式为"http://地址:端口号"
chat_model: gpt-3.5-turbo # 聊天使用模型名称,例如:gpt-3.5-turbo-0125, gpt-4-turbo-preview. 可用模型参见(https://platform.openai.com/docs/models/overview)

作图参数, 参见(https://cookbook.openai.com/articles/what_is_new_with_dalle_3) 以及 api 说明

image_model: dall-e-3 # (可选, 默认值: dall-e-3) 作图模型, 选项: dall-e-3, dall-e-2 image_quality: hd # 现在作图质量由模型决定, 该参数暂时无效。(可选, 默认值: standard) 作图质量。选项: standard(标准), hd(高清)。 image_size: 1024x1024 # (可选, 默认值: 1024x1024) 作图大小, dall-e-3 支持尺寸 1024x1024, 1792x1024, 1024x1792。

语音参数. 参考: https://platform.openai.com/docs/api-reference/audio/createSpeech

voice: alloy # 虚拟配音演员 alloy, echo, fable, onyx, nova, and shimmer. 试听: https://platform.openai.com/docs/guides/text-to-speech/voice-options voice_speed: 1.1 # 语音速度, 可选 0.25-4.0 (默认1.0) transcript_prompt: "请转录用户的语音消息,可能使用的语言是:简体中文和English" # 为语音转录提供一段提示词,以提高识别正确率

错误如下: 2024-05-05 23:52:18 初始化OpenAI API... 2024-05-05 23:52:18 启用工具 image_to_text (获取图像的文字描述) 2024-05-05 23:52:18 启用工具 text_to_image (用文字描述生成图像) 2024-05-05 23:52:18 启用工具 text_to_speech (用文字生成语音) 2024-05-05 23:52:18 启用工具 browse_link (访问链接获取内容) 2024-05-05 23:52:18 启用工具 bing_search (用必应搜索网络内容) 2024-05-05 23:52:18 启用工具 audio_transcript (语音转录成文字) 2024-05-05 23:52:18 启用工具 video_analysis (分析视频内容) 主程序发生错误: Traceback (most recent call last): File "main.py", line 42, in File "main.py", line 16, in main File "openai_wrapper.py", line 42, in init File "openai_wrapper.py", line 65, in load_config File "openai_wrapper.py", line 132, in get_assistant File "openai\resources\beta\assistants\assistants.py", line 287, in list File "openai_base_client.py", line 1249, in get_api_list File "openai_base_client.py", line 1094, in _request_api_list File "openai_base_client.py", line 889, in request File "openai_base_client.py", line 965, in _request File "openai_base_client.py", line 1013, in _retry_request File "openai_base_client.py", line 965, in _request File "openai_base_client.py", line 1013, in _retry_request File "openai_base_client.py", line 980, in _request openai.InternalServerError: Error code: 503 - {'error': {'message': '当前分组 default 下对于模型 无可用渠道 (request id: 2024050523522150057096679513566)', 'type': 'one_api_error'}}

2024-05-05 23:52:21 主程序发生错误, 即将退出: Traceback (most recent call last): File "main.py", line 42, in File "main.py", line 16, in main File "openai_wrapper.py", line 42, in init File "openai_wrapper.py", line 65, in load_config File "openai_wrapper.py", line 132, in get_assistant File "openai\resources\beta\assistants\assistants.py", line 287, in list File "openai_base_client.py", line 1249, in get_api_list File "openai_base_client.py", line 1094, in _request_api_list File "openai_base_client.py", line 889, in request File "openai_base_client.py", line 965, in _request File "openai_base_client.py", line 1013, in _retry_request File "openai_base_client.py", line 965, in _request File "openai_base_client.py", line 1013, in _retry_request File "openai_base_client.py", line 980, in _request openai.InternalServerError: Error code: 503 - {'error': {'message': '当前分组 default 下对于模型 无可用渠道 (request id: 2024050523522150057096679513566)', 'type': 'one_api_error'}}

leeileduo commented 2 weeks ago

https://github.com/labring/FastGPT/issues/2105