Description
Is there an existing issue for the same bug?
- I have checked the existing issues.
RAGFlow workspace code commit ID
b597cc4de
RAGFlow image version
v0.17.0 full
Other environment information
Ubuntu, Docker
Actual behavior
Can not generate response when I enable "Use knowledge graph" in chat mode.
Error log:
2025-03-05 23:21:00,302 INFO 14 HTTP Request: POST https://api.anthropic.com/v1/messages "HTTP/1.1 200 OK"
2025-03-05 23:21:01,390 INFO 14 HTTP Request: POST https://api.anthropic.com/v1/messages "HTTP/1.1 200 OK"
2025-03-05 23:21:01,679 ERROR 14 LLMBundle.encode_queries can't update token usage for c8af3a1efa2511efb26a0242ac120006/EMBEDDING used_tokens: 27
2025-03-05 23:21:28,538 INFO 14 HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
2025-03-05 23:21:28,540 INFO 14 Q: What are the details and stock information for material M180074?material, M180074, stock information, Types: [], Entities: ['material M180074', 'stock information']
2025-03-05 23:21:28,662 ERROR 14 LLMBundle.encode_queries can't update token usage for c8af3a1efa2511efb26a0242ac120006/EMBEDDING used_tokens: 11
2025-03-05 23:21:28,974 ERROR 14 LLMBundle.encode_queries can't update token usage for c8af3a1efa2511efb26a0242ac120006/EMBEDDING used_tokens: 27
2025-03-05 23:21:29,004 INFO 14 Retrieved entities: ['']
2025-03-05 23:21:29,004 INFO 14 Retrieved relations: [('', '')]
2025-03-05 23:21:29,004 INFO 14 Retrieved entities from types([]): []
2025-03-05 23:21:29,004 INFO 14 Retrieved N-hops: []
Traceback (most recent call last):
File "/ragflow/api/apps/conversation_app.py", line 231, in stream
for ans in chat(dia, msg, True, **req):
File "/ragflow/api/db/services/dialog_service.py", line 213, in chat
ck = settings.kg_retrievaler.retrieval(" ".join(questions),
File "/ragflow/graphrag/search.py", line 231, in retrieval
"Description": json.loads(ent["description"]).get("description", "")
File "/usr/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2025-03-05 23:21:29,005 INFO 14 172.18.0.6 - - [05/Mar/2025 23:21:29] "POST /v1/conversation/completion HTTP/1.1" 200 -
Expected behavior
generate response
Steps to reproduce
Upload file to knowledge.
Chunk Method: Knowledge Graph
Create new Assistant.
search keyword in chat assistant
Additional information
No response