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

[Bug]: 模型对话请求失败 #967

Closed
SKY-Xuan opened this issue Dec 26, 2024 · 2 comments
Closed

[Bug]: 模型对话请求失败 #967

SKY-Xuan opened this issue Dec 26, 2024 · 2 comments
Labels
bug? Bug或Bug修复相关 pd: 即将发行 pending: 已修复/实现到主分支,将在下一版本包含

Comments

@SKY-Xuan
Copy link

消息平台适配器

aiocqhttp(使用 OneBot 协议接入的)

运行环境

Docker

异常情况

[12-26 06:05:02.533] process.py (42) - [INFO] : 处理 person_734654865 的请求(2): 你好
[12-26 06:05:02.533] chat.py (94) - [ERROR] : 对话(2)请求失败: TypeError MoonshotChatCompletions._closure() takes from 3 to 4 positional arguments but 5 were given[12-26 06:05:02.678] controller.py (98) - [ERROR] : MoonshotChatCompletions._closure() takes from 3 to 4 positional arguments but 5 were given
[12-26 06:06:10.920] process.py (42) - [INFO] : 处理 person_734654865 的请求(3): !cmd default
[12-26 06:06:10.920] command.py (112) - [INFO] : 命令返回: default: 操作情景预设...
[12-26 06:06:20.288] process.py (42) - [INFO] : 处理 person_734654865 的请求(4): !default set
[12-26 06:06:20.289] command.py (85) - [INFO] : 命令(4)报错: 参数不足: 请提供情景预设名称
[12-26 06:07:24.066] process.py (42) - [INFO] : 处理 person_734654865 的请求(5): !default set default
[12-26 06:07:24.067] command.py (112) - [INFO] : 命令返回: 已设置当前会话默认情景预设为 defau...
[12-26 06:07:30.914] process.py (42) - [INFO] : 处理 person_734654865 的请求(6): !reset
[12-26 06:07:30.914] command.py (112) - [INFO] : 命令返回: 已重置当前会话
[12-26 06:07:34.542] process.py (42) - [INFO] : 处理 person_734654865 的请求(7): 你好
[12-26 06:07:34.543] chat.py (94) - [ERROR] : 对话(7)请求失败: TypeError MoonshotChatCompletions._closure() takes from 3 to 4 positional arguments but 5 were given
[12-26 06:07:34.678] controller.py (98) - [ERROR] : MoonshotChatCompletions._closure() takes from 3 to 4 positional arguments but 5 were given
[12-26 06:07:55.410] process.py (42) - [INFO] : 处理 person_734654865 的请求(8): 1
[12-26 06:07:55.411] chat.py (94) - [ERROR] : 对话(8)请求失败: TypeError MoonshotChatCompletions._closure() takes from 3 to 4 positional arguments but 5 were given
[12-26 06:07:55.549] controller.py (98) - [ERROR] : MoonshotChatCompletions._closure() takes from 3 to 4 positional arguments but 5 were given

复现步骤

配置好后,命令可以正常回复,但是对话报错

启用的插件

@SKY-Xuan SKY-Xuan added the bug? Bug或Bug修复相关 label Dec 26, 2024
@RockChinQ
Copy link
Owner

配置什么?什么模型?什么接口?怎么复现?

@SKY-Xuan
Copy link
Author

SKY-Xuan commented Dec 26, 2024

配置什么?什么模型?什么接口?怎么复现?

provider.json

{
    "enable-chat": true,
    "enable-vision": true,
    "keys": {
        "openai": [
        
        ],
        "anthropic": [
        
        ],
        "moonshot": [
            "sk-6re6KV8XmLLcJjd7mPArcsZb8TRIOszxIY6m6Ad9wzGa####"
        ],
        
        "deepseek": [],
        "gitee-ai": [
            "XXXXX"
        ]
    },
    "requester": {
        "openai-chat-completions": {
            "base-url": "https://api.openai.com/v1",
            "args": {},
            "timeout": 120
        },
        "anthropic-messages": {
            "base-url": "https://api.anthropic.com",
            "args": {
                "max_tokens": 1024
            },
            "timeout": 120
        },
        "moonshot-chat-completions": {
            "args": {},
            "base-url": "https://api.moonshot.cn/v1",
            "timeout": 120
        },
        
        "deepseek-chat-completions": {
            "base-url": "https://api.deepseek.com",
            "args": {},
            "timeout": 120
        },
        "ollama-chat": {
            "base-url": "http://127.0.0.1:11434",
            "args": {},
            "timeout": 600
        },
        "gitee-ai-chat-completions": {
            "base-url": "https://ai.gitee.com/v1",
            "args": {},
            "timeout": 120
        }
    },
    "model": "moonshot-v1-8k",
    "prompt-mode": "normal",
    "prompt": {
        "default": ""
    },
    "runner": "local-agent",
    "dify-service-api": {
        "agent": {
            "api-key": "app-1234567890",
            "timeout": 120
        },
        "app-type": "chat",
        "base-url": "https://api.dify.ai/v1",
        "chat": {
            "api-key": "app-1234567890",
            "timeout": 120
        },
        "workflow": {
            "api-key": "app-1234567890",
            "output-key": "summary",
            "timeout": 120
        }
    }
}

其余配置未改动,moonshot的moonshot-v1-8k模型

@RockChinQ RockChinQ added the pd: 即将发行 pending: 已修复/实现到主分支,将在下一版本包含 label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? Bug或Bug修复相关 pd: 即将发行 pending: 已修复/实现到主分支,将在下一版本包含
Projects
None yet
Development

No branches or pull requests

2 participants