AowerDmax / Simple-Interview-Audio-Processing

136 stars 19 forks source link

gpt没有回复,使用快捷键只有running chatgpt workflow #8

Closed One12Noah closed 2 months ago

One12Noah commented 2 months ago

1 2

One12Noah commented 2 months ago

这是.env文件: CHATGPT_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions AUTHORIZATION=*** MODEL=qwen-max SSL=0 MODE=2pass ROOKIE_HOST=116.57.83.62 ROOKIE_PORT=10097 INTERVIEWER_HOST=116.57.83.62 INTERVIEWER_PORT=10096 INTERVIEWER_WAIT_TIME=5000 ROOKIE_WAIT_TIME=5000 ROOKIE_DIALOG_LEN=1 CHATGPT_DIALOG_LEN=4 INTERVIEWER_DIALOG_LEN=5 REDIS_HOST=116.57.83.62 REDIS_PORT=6379 AGGREGATE_DEVICE_INDEX=2 MIC_DEVICE_INDEX=1 MEILISEARCH_HOST=116.57.83.62 MEILISEARCH_PORT=7700 MEILISEARCH_DEEP=1 RAG_ENABLED=True INTERVAL_TIME=500 DATA_QUEUE_KEYS=dialog_manager:chatgpt,dialog_manager:interviewer,dialog_manager:rookie GO_APP_HOST=0.0.0.0 GO_APP_PORT=8080 WS_HOST=116.57.83.62 WS_PORT=8080

R2_ACCESS_KEY_ID= R2_SECRET_ACCESS_KEY= R2_BUCKET_NAME= R2_REGION=us-east-1 R2_ENDPOINT_URL= R2_CUSTOM_DOMAIN=

One12Noah commented 2 months ago

麻烦大佬有空帮忙回复一下,谢谢您

AowerDmax commented 2 months ago

你使用的是openai风格的接口吗?

我从阿里云的官方文档看到

通过OpenAI兼容-HTTP调用
如果您需要通过OpenAI兼容的HTTP方式进行调用,需要配置的完整访问endpoint如下: 
POST https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions

请注意你R2OSS相关信息的保密.

另外你可能需要重启终端,才能保证.env 文件的重新读入.

One12Noah commented 2 months ago

大佬,已经用这个URL测试过了,没有问题。是不是客户端部署在window系统下的原因?按下快捷键网页端没有产生chatgpt的对话窗口。:curl https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -d '{ "model": "qwen-max", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "Hello!" } ] }'

One12Noah commented 2 months ago

已解决,分享一下经验: 1、重新下载第三方库,下载pip install python-dotenv; 2、ChatgptManager.py中路径上一级目录应该为"../",即self.prompt_directory = "../workflows/prompt_1" 3、ChatgptManager.py中读取md文件时添加encoding="UTF-8"。即with open(file_path, 'r',encoding="UTF-8") as file: