chatchat-space / Langchain-Chatchat

Langchain-Chatchat(原Langchain-ChatGLM)基于 Langchain 与 ChatGLM, Qwen 与 Llama 等语言模型的 RAG 与 Agent 应用 | Langchain-Chatchat (formerly langchain-ChatGLM), local knowledge based LLM (like ChatGLM, Qwen and Llama) RAG and Agent app with langchain
Apache License 2.0
31.63k stars 5.52k forks source link

glm-4v-9b 多模态模型图文对话报错 #4695

Closed sy960923 closed 2 months ago

sy960923 commented 2 months ago

2024-08-08 09:40:17,231 httpx 26148 INFO HTTP Request: POST http://127.0.0.1:7861/v1/files "HTTP/1.1 200 OK" INFO: 127.0.0.1:59818 - "GET /tools HTTP/1.1" 200 OK 2024-08-08 09:40:30,052 httpx 26148 INFO HTTP Request: GET http://127.0.0.1:7861/tools "HTTP/1.1 200 OK" INFO: 127.0.0.1:59819 - "GET /v1/files/YXNzaXN0YW50cy8yMDI0LTA4LTA4L3BhZ2VfMS5wbmc%3D/content HTTP/1.1" 200 OK 2024-08-08 09:40:30.596 | WARNING | chatchat.server.api_server.chat_routes:chat_completions:201 - failed to add message to db: (sqlite3.ProgrammingError) Error binding parameter 4: type 'pydantic_core._pydantic_core.ValidatorIterator' is not supported [SQL: INSERT INTO message (id, conversation_id, chat_type, "query", response, meta_data, feedback_score, feedback_reason, create_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP) RETURNING create_time] [parameters: ('c996d5bbc35e43e3b1e2dd407f30cc91', 'b156295a52bf4d8588f7bc231797fad7', 'llm_chat', ValidatorIterator(index=0, schema=Some(Union(UnionValidator { mode: Smart, choices: [(DefinitionRef(DefinitionRefValidator { definition: "typed-dict" ... (1707 characters truncated) ... ow, extras_validator: None, strict: false, loc_by_alias: true }), None)], custom_error: None, strict: false, name: "union[typed-dict,typed-dict]" }))), '', '{}', -1, '')] (Background on this error at: https://sqlalche.me/e/20/f405) 2024-08-08 09:40:30,662 httpx 33720 INFO HTTP Request: POST http://192.168.164.45:9997/v1/chat/completions "HTTP/1.1 500 Internal Server Error" 2024-08-08 09:40:30,663 openai._base_client 33720 INFO Retrying request to /chat/completions in 0.875820 seconds 2024-08-08 09:40:31,582 httpx 33720 INFO HTTP Request: POST http://192.168.164.45:9997/v1/chat/completions "HTTP/1.1 500 Internal Server Error" 2024-08-08 09:40:31,584 openai._base_client 33720 INFO Retrying request to /chat/completions in 1.612213 seconds 2024-08-08 09:40:33,230 httpx 33720 INFO HTTP Request: POST http://192.168.164.45:9997/v1/chat/completions "HTTP/1.1 500 Internal Server Error" INFO: 127.0.0.1:59820 - "POST /chat/chat/completions HTTP/1.1" 500 Internal Server Error 2024-08-08 09:40:33,233 httpx 26148 INFO HTTP Request: POST http://127.0.0.1:7861/chat/chat/completions "HTTP/1.1 500 Internal Server Error" ERROR: Exception in ASGI application Traceback (most recent call last): File "d:\python11\Lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 396, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "d:\python11\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 70, in call return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "d:\python11\Lib\site-packages\fastapi\applications.py", line 1054, in call await super().call(scope, receive, send) File "d:\python11\Lib\site-packages\starlette\applications.py", line 123, in call await self.middleware_stack(scope, receive, send) File "d:\python11\Lib\site-packages\starlette\middleware\errors.py", line 186, in call raise exc File "d:\python11\Lib\site-packages\starlette\middleware\errors.py", line 164, in call await self.app(scope, receive, _send) File "d:\python11\Lib\site-packages\starlette\middleware\exceptions.py", line 62, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "d:\python11\Lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app raise exc File "d:\python11\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "d:\python11\Lib\site-packages\starlette\routing.py", line 758, in call await self.middleware_stack(scope, receive, send) File "d:\python11\Lib\site-packages\starlette\routing.py", line 778, in app await route.handle(scope, receive, send) File "d:\python11\Lib\site-packages\starlette\routing.py", line 299, in handle await self.app(scope, receive, send) File "d:\python11\Lib\site-packages\starlette\routing.py", line 79, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "d:\python11\Lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app raise exc File "d:\python11\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "d:\python11\Lib\site-packages\starlette\routing.py", line 74, in app response = await func(request) ^^^^^^^^^^^^^^^^^^^ File "d:\python11\Lib\site-packages\fastapi\routing.py", line 299, in app raise e File "d:\python11\Lib\site-packages\fastapi\routing.py", line 294, in app raw_response = await run_endpoint_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "d:\python11\Lib\site-packages\fastapi\routing.py", line 191, in run_endpoint_function return await dependant.call(values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "d:\python11\Lib\site-packages\chatchat\server\api_server\chat_routes.py", line 208, in chat_completions return await openai_request( ^^^^^^^^^^^^^^^^^^^^^ File "d:\python11\Lib\site-packages\chatchat\server\api_server\openai_routes.py", line 115, in openai_request result = await method(params) ^^^^^^^^^^^^^^^^^^^^^^ File "d:\python11\Lib\site-packages\openai\resources\chat\completions.py", line 1305, in create return await self._post( ^^^^^^^^^^^^^^^^^ File "d:\python11\Lib\site-packages\openai_base_client.py", line 1815, in post return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "d:\python11\Lib\site-packages\openai_base_client.py", line 1509, in request return await self._request( ^^^^^^^^^^^^^^^^^^^^ File "d:\python11\Lib\site-packages\openai_base_client.py", line 1595, in _request return await self._retry_request( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "d:\python11\Lib\site-packages\openai_base_client.py", line 1642, in _retry_request return await self._request( ^^^^^^^^^^^^^^^^^^^^ File "d:\python11\Lib\site-packages\openai_base_client.py", line 1595, in _request return await self._retry_request( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "d:\python11\Lib\site-packages\openai_base_client.py", line 1642, in _retry_request return await self._request( ^^^^^^^^^^^^^^^^^^^^ File "d:\python11\Lib\site-packages\openai_base_client.py", line 1610, in _request raise self._make_status_error_from_response(err.response) from None openai.InternalServerError: Error code: 500 - {'detail': '[address=0.0.0.0:37905, pid=98] None: Max retries exceeded with url: /v1/files/YXNzaXN0YW50cy8yMDI0LTA4LTA4L3BhZ2VfMS5wbmc=/content (Caused by None)'} 2024-08-08 09:40:33,247 openai._base_client 26148 INFO Retrying request to /chat/completions in 0.944354 seconds

sy960923 commented 2 months ago

已经找到方法,是本地临时图片不行需要网络路径图片

jiusi9 commented 2 months ago

模型在你本地吗,我也遇到了,本地模型也不能用本地临时图片吗?

sy960923 commented 2 months ago

模型在你本地吗,我也遇到了,本地模型也不能用本地临时图片吗?

QQ20240812-163652 你这样试试本地临时图片路径填进去看行不行