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]: Cannot open document for: /v1/chat/completions #1629

Closed
ATentropy opened this issue Mar 14, 2024 · 3 comments
Closed

[Bug]: Cannot open document for: /v1/chat/completions #1629

ATentropy opened this issue Mar 14, 2024 · 3 comments

Comments

@ATentropy
Copy link

Installation Method | 安装方法与平台

OneKeyInstall (一键安装脚本-windows)

Version | 版本

Latest | 最新版

OS | 操作系统

Windows

Describe the bug | 简述

key使用了项目copilot-gpt4-service
修改了config_private.py中的重定向(图1)
成功运行main.py,输入后返回异常(图2)
重定向url中,localhost换成127.0.0.1也不行
尝试了隔壁Nextchat,完美运行(图3),所以key应该没问题

Screen Shot | 有帮助的截图

屏幕截图 2024-03-14 210207
image
image

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

image

@binary-husky
Copy link
Owner

binary-husky commented Mar 15, 2024

我无法复现这个问题,接入coplilot没出现任何问题……

API_KEY = 'sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
LLM_MODEL = "gpt-4"
API_URL_REDIRECT = {
    "https://api.openai.com/v1/chat/completions": "http://127.0.0.1:8080/v1/chat/completions"
}

Everything works

@ATentropy
Copy link
Author

知道为什么了,8080端口被占的原因,已解决。但不知道为什么隔壁没问题:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants