LLM-Red-Team / qwen-free-api

🚀 阿里通义千问2.5大模型逆向API白嫖测试【特长:六边形战士】,支持高速流式输出、无水印AI绘图、长文档解读、图像解析、多轮对话,零配置部署,多路token支持,自动清理会话痕迹。
https://udify.app/chat/qOXzVl5kkvhQXM8r
GNU General Public License v3.0
588 stars 166 forks source link

上下文多轮问答提交conversation_id,没有起作用 #36

Closed shyBoy-ico closed 5 months ago

Vinlic commented 5 months ago

提供你的传参检查

Vinlic commented 5 months ago

conversation_id打印一下

shyBoy-ico commented 5 months ago
async def qwen_ai_free(self, params, model='qwen-turbo', stream=False):
    headers = {
        'Authorization': f'Bearer {self.auth_token}',
        'Content-Type': 'application/json'
    }
    data = {
        'model': model,
        'conversation_id': params['convers_id'],
        'messages': [{
            'role': 'user',
            'content': params['question']
        }],
        'stream': stream
    }
    print(data)
    url = self.base_url+'/v1/chat/completions'
    response = requests.post(url, headers=headers, json=data)
    return response.json()

{'model': 'qwen-turbo', 'conversation_id': 'fcbcc9f9dd86491ba0a2bd8aed0a9247', 'messages': [{'role': 'user', 'content': '他会和周树人打架嘛'}], 'stream': False}

Vinlic commented 5 months ago

你应该更新到最新版本了,最新版本的conversation_id是类似bc9ef150d0e44794ab624df958292300-40811965812e4782bb87f1a9e4e2b2cd

shyBoy-ico commented 5 months ago

就是我要更新我的版本是吧

Vinlic commented 5 months ago

是的