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]: azure 模型下知识库问答报错 #910

Closed
1 of 2 tasks
stockcoder opened this issue Oct 8, 2023 · 7 comments · Fixed by #1158
Closed
1 of 2 tasks

[Bug]: azure 模型下知识库问答报错 #910

stockcoder opened this issue Oct 8, 2023 · 7 comments · Fixed by #1158
Labels
bug Something isn't working

Comments

@stockcoder
Copy link

这个bug是否已存在现有issue了?

  • 我确认没有已有issue,且已阅读常见问题

错误表现

2023-10-08 15:38:18,860 [INFO] [index_func.py:125] 构建索引中……
2023-10-08 15:38:26,338 [WARNING] [before_sleep.py:65] Retrying langchain.embeddings.openai.embed_with_retry.._embed_with_retry in 4.0 seconds as it raised APIConnectionError: Error communicating with OpenAI: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer')).
2023-10-08 15:38:30,670 [WARNING] [before_sleep.py:65] Retrying langchain.embeddings.openai.embed_with_retry.._embed_with_retry in 4.0 seconds as it raised APIConnectionError: Error communicating with OpenAI: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer')).
2023-10-08 15:38:34,986 [WARNING] [before_sleep.py:65] Retrying langchain.embeddings.openai.embed_with_retry.._embed_with_retry in 4.0 seconds as it raised APIConnectionError: Error communicating with OpenAI: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer')).
2023-10-08 15:38:39,309 [WARNING] [before_sleep.py:65] Retrying langchain.embeddings.openai.embed_with_retry.._embed_with_retry in 8.0 seconds as it raised APIConnectionError: Error communicating with OpenAI: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer')).
2023-10-08 15:38:47,653 [WARNING] [before_sleep.py:65] Retrying langchain.embeddings.openai.embed_with_retry.._embed_with_retry in 10.0 seconds as it raised APIConnectionError: Error communicating with OpenAI: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer')).
2023-10-08 15:38:57,992 [ERROR] [index_func.py:136] 索引构建失败!Error communicating with OpenAI: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))

复现操作

不提供其它 key,只配置azure 的,也正确提供了azure_embedding_deployment_name,聊天可以正常使用,但是上传文档知识库似乎链接的还是 openai 的

错误日志

No response

运行环境

  • OS:
  • Browser:
  • Gradio version:
  • Python version:

帮助解决

  • 我愿意协助解决!

补充说明

No response

@stockcoder stockcoder added the bug Something isn't working label Oct 8, 2023
@GaiZhenbiao
Copy link
Owner

你可以把配置信息发到我的邮箱,我解决一下:chefs-vernier.0q@icloud.com

@TigrisRiva
Copy link

遇到相同的问题。配置我仔细检查了没有问题
索引构建失败!Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}

@TigrisRiva
Copy link

完整信息:
加载索引中……
/usr/local/lib/python3.9/site-packages/langchain/embeddings/openai.py:320: UserWarning: If you have openai>=1.0.0 installed and are using Azure, please use the AzureOpenAIEmbeddings class.
warnings.warn(
2023-12-13 01:31:08,698 [INFO] [index_func.py:25] loading file: 简易待办.txt
2023-12-13 01:31:08,700 [INFO] [index_func.py:126] 构建索引中……
2023-12-13 01:31:09,017 [ERROR] [index_func.py:137] 索引构建失败!Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}

@GaiZhenbiao
Copy link
Owner

我调查一下🤔你可以暂时使用本地编制索引的功能,其实效果不比OpenAI的差。

@TigrisRiva
Copy link

这个其实不能算一个BUG,只不过大家搭建环境的时候OPENAI版本号不一样
导致整个代码可能都不同。

@shydyl
Copy link

shydyl commented Jan 14, 2024

我也遇到了同样的情况,对话是正常的,但是知识库会报这个错

@ZhengQinyu
Copy link
Contributor

ZhengQinyu commented Sep 5, 2024

完整信息: 加载索引中…… /usr/local/lib/python3.9/site-packages/langchain/embeddings/openai.py:320: UserWarning: If you have openai>=1.0.0 installed and are using Azure, please use the AzureOpenAIEmbeddings class. warnings.warn( 2023-12-13 01:31:08,698 [INFO] [index_func.py:25] loading file: 简易待办.txt 2023-12-13 01:31:08,700 [INFO] [index_func.py:126] 构建索引中…… 2023-12-13 01:31:09,017 [ERROR] [index_func.py:137] 索引构建失败!Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}

已经按提示修改 #1158

同时我还发现当我的配置文件中azure_openai_api_base_url=https://xxxxxxx.openai.azure.com/openai 就提示 ”Resource not found“,改成https://xxxxxxx.openai.azure.com/ ,local_embedding 也 改成false 就可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
5 participants