graphrag icon indicating copy to clipboard operation
graphrag copied to clipboard

You are going to be given a malformed JSON string that threw an error during json[Bug]: <title>

Open najsword opened this issue 1 year ago • 0 comments

Do you need to file an issue?

  • [ ] I have searched the existing issues and this bug is not already filed.
  • [ ] My model is hosted on OpenAI or Azure. If not, please look at the "model providers" issue and don't file a new one here.
  • [ ] I believe this is a legitimate bug, not just a question. If this is a question, please use the Discussions area.

Describe the bug

setting.yaml about llm setting of model_supports_json set false; llm error: INFO 07-28 13:34:41 logger.py:36] Received request chat-afa3e53a385f4997b4257113b64f5d8b: prompt: '<|begin_of_text|><|start_header_id|>user<|end_header_id|>\n\nYou are going to be given a malformed JSON string that threw an error during json.loads.\nIt probably contains unnecessary escape sequences, or it is missing a comma or colon somewhere.\nYour task is to fix this string and return a well-formed JSON string containing a single object.\nEliminate any unnecessary escape sequences.\nOnly return valid JSON, parseable with json.loads, without commentary.\n\n# Examples\n-----------\nText: {{ \"title\": \"abc\", \"summary\": \"def\" }}\nOutput: {{"title": "abc", "summary": "def"}}\n-----------\nText: {{"title": "abc", "summary": "def"\nOutput: {{"title": "abc", "summary": "def"}}\n-----------\nText: {{"title': "abc", 'summary": "def"\nOutput: {{"title": "abc", "summary": "def"}}\n-----------\nText: "{{"title": "abc", "summary": "def"}}"\nOutput: {{"title": "abc", "summary": "def"}}\n-----------\nText: [{{"title": "abc", "summary": "def"}}]\nOutput: [{{"title": "abc", "summary": "def"}}]\n-----------\nText: [{{"title": "abc", "summary": "def"}}, {{ \"title\": \"abc\", \"summary\": \"def\" }}]\nOutput: [{{"title": "abc", "summary": "def"}}, {{"title": "abc", "summary": "def"}}]\n-----------\nText: json\n[{{"title": "abc", "summary": "def"}}, {{ \\"title\\": \\"abc\\", \\"summary\\": \\"def\\" }}]

nvidia:4090
llm: llama3:8b-instruct inference framewoker: vllm==0.4.3

How to fix this error?

Steps to reproduce

No response

Expected Behavior

No response

GraphRAG Config Used

# Paste your config here

Logs and screenshots

No response

Additional Information

  • GraphRAG Version:
  • Operating System:
  • Python Version:
  • Related Issues:

najsword avatar Jul 28 '24 05:07 najsword