An error occured when I use the Knowledge graph methrod in version 0.11.0:
Task has been received.
Start to parse.
Finish parsing.
Extracting entities.
Knowledge graph extraction error:'NoneType' object is not subscriptable
Knowledge graph extraction error:'NoneType' object is not subscriptable
1/1, elapsed: 66.27512523718178s, used tokens: 3887
1/1, elapsed: 90.88857838138938s, used tokens: 3861
The error logs was found from console of ragflow-server:
[INFO] [2024-09-15 07:42:43,610] [_internal._log] [line:96]: 192.168.224.7 - - [15/Sep/2024 07:42:43] "GET /v1/document/list?kb_id=5108961c733511ef82ce0242c0a8e007&page=1&page_size=10 HTTP/1.1" 200 -
[ERROR] [2024-09-15 07:42:47,859] [graph_extractor.call] [line:135]: error extracting graph
Traceback (most recent call last):
File "/ragflow/graphrag/graph_extractor.py", line 128, in call
result, token_count = self._process_document(text, prompt_variables)
File "/ragflow/graphrag/graph_extractor.py", line 166, in _process_document
response = self._llm.chat(text, [{"role": "user", "content": "Output:"}], gen_conf)
File "/ragflow/api/db/services/llm_service.py", line 250, in chat
txt, used_tokens = self.mdl.chat(system, history, gen_conf)
File "/ragflow/rag/llm/chat_model.py", line 45, in chat
ans = response.choices[0].message.content.strip()
TypeError: 'NoneType' object is not subscriptable
[ERROR] [2024-09-15 07:42:48,000] [graph_extractor.call] [line:135]: error extracting graph
Traceback (most recent call last):
File "/ragflow/graphrag/graph_extractor.py", line 128, in call
result, token_count = self._process_document(text, prompt_variables)
File "/ragflow/graphrag/graph_extractor.py", line 166, in _process_document
response = self._llm.chat(text, [{"role": "user", "content": "Output:"}], gen_conf)
File "/ragflow/api/db/services/llm_service.py", line 250, in chat
txt, used_tokens = self.mdl.chat(system, history, gen_conf)
File "/ragflow/rag/llm/chat_model.py", line 45, in chat
ans = response.choices[0].message.content.strip()
TypeError: 'NoneType' object is not subscriptable
Expected behavior
No response
Steps to reproduce
upload the document and process with Knowledge graph methord
Is there an existing issue for the same bug?
Branch name
0.11.0
Commit ID
none
Other environment information
No response
Actual behavior
An error occured when I use the Knowledge graph methrod in version 0.11.0:
The error logs was found from console of ragflow-server:
Expected behavior
No response
Steps to reproduce
Additional information
No response