neo4j-labs / llm-graph-builder

Neo4j graph construction from unstructured data using LLMs
https://neo4j.com/labs/genai-ecosystem/llm-graph-builder/
Apache License 2.0
2.15k stars 329 forks source link

A bug in the request for populate_graphic_schema #749

Open Super-six-java opened 1 week ago

Super-six-java commented 1 week ago

When I am using the local ollama Qwen2:72b model, I encountered an error while requesting Populate_graphic_stemplate

2024-09-20 09:54:15,056 - Exception in getting the schema from text:Received unsupported arguments {'method': 'function_calling'}
Traceback (most recent call last):
  File "/data/workspace/neo4j/llm-graph-builder/backend/score.py", line 539, in populate_graph_schema
    result = populate_graph_schema_from_text(input_text, model, is_schema_description_checked)
  File "/data/workspace/neo4j/llm-graph-builder/backend/src/main.py", line 568, in populate_graph_schema_from_text
    result = schema_extraction_from_text(text, model, is_schema_description_cheked)
  File "/data/workspace/neo4j/llm-graph-builder/backend/src/shared/schema_extraction.py", line 40, in schema_extraction_from_text
    runnable = prompt | llm.with_structured_output(
  File "/home/ubuntu/anaconda3/envs/neo4j/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py", line 1232, in with_structured_output
    raise ValueError(f"Received unsupported arguments {kwargs}")
ValueError: Received unsupported arguments {'method': 'function_calling'}
kartikpersistent commented 1 week ago

@aashipandya

aashipandya commented 1 week ago

There is an issue with function calling of LLama models, working on fixing those. Will update here when fix will be there in dev.