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 OpenAI 回复失败 #1173

Open
1 of 2 tasks
g-wellsa opened this issue Oct 22, 2024 · 2 comments
Open
1 of 2 tasks

[Bug]: Azure OpenAI 回复失败 #1173

g-wellsa opened this issue Oct 22, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@g-wellsa
Copy link

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

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

错误表现

2024-10-22 17:46:45,174 [INFO] [models.py:149] 模型设置为了: Azure OpenAI
2024-10-22 17:46:50,863 [INFO] [base_model.py:615] 用户的输入为:who are you
E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_core_api\deprecation.py:119: LangChainDeprecationWarning: The method BaseChatModel.__call__ was deprecated in langchain-core 0.1.7 and will be removed in 0.3.0. Use invoke instead.
warn_deprecated(
Exception in thread Thread-9 (thread_func):
Traceback (most recent call last):
File "D:\software\anaconda3\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "D:\software\anaconda3\Lib\threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "E:\workspace\ChuanhuChatGPT\modules\models\base_model.py", line 1240, in thread_func
self.model(
File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_core_api\deprecation.py", line 148, in warning_emitting_wrapper
return wrapped(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_core\language_models\chat_models.py", line 808, in call
generation = self.generate(
^^^^^^^^^^^^^^
File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_core\language_models\chat_models.py", line 421, in generate
raise e
File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_core\language_models\chat_models.py", line 411, in generate
self._generate_with_cache(
File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_core\language_models\chat_models.py", line 632, in _generate_with_cache
result = self._generate(
^^^^^^^^^^^^^^^
File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_community\chat_models\openai.py", line 434, in _generate
return generate_from_stream(stream_iter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_core\language_models\chat_models.py", line 67, in generate_from_stream
for chunk in stream:
File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_community\chat_models\openai.py", line 398, in _stream
for chunk in self.completion_with_retry(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_community\chat_models\openai.py", line 356, in completion_with_retry
return self.client.create(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\openai_utils_utils.py", line 275, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\openai\resources\chat\completions.py", line 667, in create
return self._post(
^^^^^^^^^^^
File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\openai_base_client.py", line 1213, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\openai_base_client.py", line 902, in request
return self._request(
^^^^^^^^^^^^^^
File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\openai_base_client.py", line 993, in _request
raise self._make_status_error_from_response(err.response) from None
openai.NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}

复现操作

流程ok

错误日志

2024-10-22 17:46:45,174 [INFO] [models.py:149] 模型设置为了: Azure OpenAI
2024-10-22 17:46:50,863 [INFO] [base_model.py:615] 用户的输入为:who are you
E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_core\_api\deprecation.py:119: LangChainDeprecationWarning: The method `BaseChatModel.__call__` was deprecated in langchain-core 0.1.7 and will be removed in 0.3.0. Use invoke instead.
  warn_deprecated(
Exception in thread Thread-9 (thread_func):
Traceback (most recent call last):
  File "D:\software\anaconda3\Lib\threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "D:\software\anaconda3\Lib\threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "E:\workspace\ChuanhuChatGPT\modules\models\base_model.py", line 1240, in thread_func
    self.model(
  File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_core\_api\deprecation.py", line 148, in warning_emitting_wrapper
    return wrapped(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_core\language_models\chat_models.py", line 808, in __call__
    generation = self.generate(
                 ^^^^^^^^^^^^^^
  File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_core\language_models\chat_models.py", line 421, in generate
    raise e
  File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_core\language_models\chat_models.py", line 411, in generate
    self._generate_with_cache(
  File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_core\language_models\chat_models.py", line 632, in _generate_with_cache
    result = self._generate(
             ^^^^^^^^^^^^^^^
  File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_community\chat_models\openai.py", line 434, in _generate
    return generate_from_stream(stream_iter)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_core\language_models\chat_models.py", line 67, in generate_from_stream
    for chunk in stream:
  File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_community\chat_models\openai.py", line 398, in _stream
    for chunk in self.completion_with_retry(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\langchain_community\chat_models\openai.py", line 356, in completion_with_retry
    return self.client.create(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\openai\_utils\_utils.py", line 275, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\openai\resources\chat\completions.py", line 667, in create
    return self._post(
           ^^^^^^^^^^^
  File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\openai\_base_client.py", line 1213, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\openai\_base_client.py", line 902, in request
    return self._request(
           ^^^^^^^^^^^^^^
  File "E:\workspace\ChuanhuChatGPT\ChuanhuChat\Lib\site-packages\openai\_base_client.py", line 993, in _request
    raise self._make_status_error_from_response(err.response) from None
openai.NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}

运行环境

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

帮助解决

  • 我愿意协助解决!

补充说明

No response

@g-wellsa g-wellsa added the bug Something isn't working label Oct 22, 2024
@GaiZhenbiao
Copy link
Owner

微软停止了中国区个人Azure OpenAI的服务

@g-wellsa
Copy link
Author

微软停止了中国区个人Azure OpenAI的服务

no no no 我在chatbox 上都可以

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
Development

No branches or pull requests

2 participants