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

为什么我换成本地的大模型问问题怎么没有回答啊? #1

Open
kuang1216 opened this issue Mar 15, 2024 · 3 comments
Open

Comments

@kuang1216
Copy link

No description provided.

@weisuzhou
Copy link

你好,请问你解决了吗?求指教

@zhuzhu-2008
Copy link

你好请问解决了吗?是格式不符还是什么问题,也没有报错
修改了utils.py
def get_model(
model: str = "http://XXX/v1", #"gpt-3.5-turbo-0613",
streaming: bool = True,
callbacks: Callbacks = None) -> ChatOpenAI:
# model = ChatOpenAI(model=model, streaming=streaming, callbacks=callbacks)
model = ChatOpenAI(
streaming=streaming,
verbose=True,
callbacks=callbacks,
openai_api_key="none",
openai_api_base=model,
model_name="XXX"
)
return model

@zhuzhu-2008
Copy link

还是会报错:
Retrying langchain_community.embeddings.openai.embed_with_retry.._embed_with_retry in 4.0 seconds as it raised APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/embeddings (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa8b3ff6ac0>: Failed to establish a new connection: [Errno 101] Network is unreachable')).

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