binary-husky / gpt_academic

为GPT/GLM等LLM大语言模型提供实用化交互接口,特别优化论文阅读/润色/写作体验,模块化设计,支持自定义快捷按钮&函数插件,支持Python和C++等项目剖析&自译解功能,PDF/LaTex论文翻译&总结功能,支持并行问询多种LLM模型,支持chatglm3等本地模型。接入通义千问, deepseekcoder, 讯飞星火, 文心一言, llama2, rwkv, claude2, moss等。
https://github.com/binary-husky/gpt_academic/wiki/online
GNU General Public License v3.0
65.6k stars 8.06k forks source link

[Bug]: 通义千问请配置 DASHSCOPE_API_KEY #1899

Open GuanruTan opened 3 months ago

GuanruTan commented 3 months ago

Installation Method | 安装方法与平台

Anaconda (I used latest requirements.txt)

Version | 版本

Latest | 最新版

OS | 操作系统

Windows

Describe the bug | 简述

我在config_private.py添加了api_keyAPI_KEY = "sk-fxxxxxxxxxxxxxxxxab";模型选择添加了通义千问

LLM_MODEL = "qwen-turbo" # 可选 ↓↓↓
AVAIL_LLM_MODELS = ["qwen-turbo", "qwen-plus", "qwen-max", "qwen-local",
                    "gpt-4-1106-preview", "gpt-4-turbo-preview", "gpt-4-vision-preview",
                    "gpt-4o", "gpt-4-turbo", "gpt-4-turbo-2024-04-09",
                    "gpt-3.5-turbo-1106", "gpt-3.5-turbo-16k", "gpt-3.5-turbo", "azure-gpt-3.5",
                    "gpt-4", "gpt-4-32k", "azure-gpt-4", "glm-4", "glm-4v", "glm-3-turbo",
                    "gemini-pro", "chatglm3"
                    ]

此外,我再电脑环境变量新建了DASHSCOPE_API_KEY 当我开始对话的时候还是说请配置 DASHSCOPE_API_KEY

Screen Shot | 有帮助的截图

image

image

Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback(如有) + 帮助我们复现的测试材料样本(如有)

image

binaryYuki commented 3 months ago

Hi,

请参照ref: https://github.com/binary-husky/gpt_academic/blob/85b92b7f07af5dab3c551ca5444a5e1d146e1b24/config.py#L130-L133

在您的 config_private.py下配置 而不是系统环境变量