私有模型-ollama-添加模型成功。创建应用,AI模型选择添加的模型,提问回答显示异常“connect error“。
unexpected-exception日志文件中提示openai.APIConnectionError: Connection error.
Traceback (most recent call last):
File "/opt/maxkb/app/apps/application/chat_pipeline/step/chat_step/impl/base_chat_step.py", line 68, in event_content
for chunk in response:
File "/opt/py3/lib/python3.11/site-packages/langchain_core/language_models/chat_models.py", line 411, in stream
raise e
File "/opt/py3/lib/python3.11/site-packages/langchain_core/language_models/chat_models.py", line 391, in stream
for chunk in self._stream(messages, stop=stop, **kwargs):
File "/opt/py3/lib/python3.11/site-packages/langchain_openai/chat_models/base.py", line 637, in _stream
response = self.client.create(**payload)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/openai/_utils/_utils.py", line 275, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/openai/resources/chat/completions.py", line 859, in create
return self._post(
^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/openai/_base_client.py", line 1280, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/openai/_base_client.py", line 957, in request
return self._request(
^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/openai/_base_client.py", line 1017, in _request
return self._retry_request(
^^^^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/openai/_base_client.py", line 1095, in _retry_request
return self._request(
^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/openai/_base_client.py", line 1017, in _request
return self._retry_request(
^^^^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/openai/_base_client.py", line 1095, in _retry_request
return self._request(
^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/openai/_base_client.py", line 1027, in _request
raise APIConnectionError(request=request) from err
openai.APIConnectionError: Connection error.