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

APIConnectionError: Connection error. #419

Open
RyanOvO opened this issue Aug 22, 2024 · 8 comments
Open

APIConnectionError: Connection error. #419

RyanOvO opened this issue Aug 22, 2024 · 8 comments

Comments

@RyanOvO
Copy link

RyanOvO commented Aug 22, 2024

报错:
image

代码:
image

以为是模型的API服务接口没起来,但是试了下,没问题,用ip和127.0.0.1本地地址都试过,全是一样的效果。是不是漏了什么配置?

@pan-x-c
Copy link
Collaborator

pan-x-c commented Aug 22, 2024

能否提供更详细的模型部署信息

使用 openai_chat 类型的模型配置要求你的模型服务已经正常启动且服务接口兼容 OpenAI

@RyanOvO
Copy link
Author

RyanOvO commented Aug 22, 2024

能否提供更详细的模型部署信息

使用 openai_chat 类型的模型配置要求你的模型服务已经正常启动且服务接口兼容 OpenAI

image

这是我用postman请求的模型接口,该有的都有,是ok的

@pan-x-c
Copy link
Collaborator

pan-x-c commented Aug 22, 2024

base_url 填写错误,请使用 http://192.168.7.55:7860/v1/

@RyanOvO
Copy link
Author

RyanOvO commented Aug 22, 2024

base_url 填写错误,请使用 http://192.168.7.55:7860/v1/

一样的,我都用过。就像我的问题描述那样,ip地址和本地127,我都试过,只是截图只截图127的地址。现在补上ip地址:
image
image

@pan-x-c
Copy link
Collaborator

pan-x-c commented Aug 22, 2024

model_name 改为 glm-4-9b-chat

@RyanOvO
Copy link
Author

RyanOvO commented Aug 22, 2024

model_name 改为 glm-4-9b-chat

都试了。因为我是基于llamafactory的vllm命令部署起来的基座模型,model-name,随便给就行。而你说的这个,我也试过,没用

@DavdGao
Copy link
Collaborator

DavdGao commented Aug 22, 2024

@RyanOvO 请尝试将base_url改为http://192.168.7.55:7860/v1/chat/completions?或者将base_url中使用localhost作为IP段。

@RyanOvO
Copy link
Author

RyanOvO commented Aug 22, 2024

@RyanOvO 请尝试将base_url改为http://192.168.7.55:7860/v1/chat/completions?或者将base_url中使用localhost作为IP段。

提issue前都尝试过。一样的报错。

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

3 participants