-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError on calling LLMGraphTransformer.convert_to_graph_documents #21482
Comments
Let me see. |
I am having the same issue here :'/ |
its able to run llama2 server and model but having this same bug/error CODE: import os llm = Ollama(temperature=0, model="llama2") os.environ["NEO4J_URI"] = "neo4j://localhost:7687" graph = Neo4jGraph() text = """Marie Curie, born in 1867, was a Polish and naturalised-French physicist and chemist who conducted pioneering research on radioactivity.She was the first woman to win a Nobel Prize, the first person to win a Nobel Prize twice, and the only person to win a Nobel Prize in two scientific fields.Her husband, Pierre Curie, was a co-winner of her first Nobel Prize, making them the first-ever married couple to win the Nobel Prize and launching the Curie family legacy of five Nobel Prizes.She was, in 1906, the first woman to become a professor at the University of Paris.""" documents = [Document(page_content=text)] ERRORAttributeError Traceback (most recent call last) File C:\tools\Anaconda3\lib\site-packages\langchain_experimental\graph_transformers\llm.py:646, in LLMGraphTransformer.convert_to_graph_documents(self, documents) File C:\tools\Anaconda3\lib\site-packages\langchain_experimental\graph_transformers\llm.py:646, in (.0) File C:\tools\Anaconda3\lib\site-packages\langchain_experimental\graph_transformers\llm.py:595, in LLMGraphTransformer.process_response(self, document) AttributeError: 'str' object has no attribute 'content' |
AttributeError Traceback (most recent call last) 2 frames AttributeError: 'str' object has no attribute 'content' |
I'm also facing the same error. |
Running the same "Marie Curie" use case (with AzureOpeAi) i always get empty nodes. On Langsmith I can that the model is able to extract the nodes, but i see on the PydanticToolsParser step:
|
Updates on the original issue: (1) I switched from Mistral to OpenAI (GPT 3.5 Turbo) and encountered a different error message.
(2) I referred to the following issue and adjusted the settings in Neo4j as suggested: #12901 (comment) Currently, I am facing this error:
Version Info:
|
…cuments langchain-ai#21482 Fix AttributeError on calling LLMGraphTransformer.convert_to_graph_documents langchain-ai#21482 since raw_schema is always a str
Fix AttributeError on calling LLMGraphTransformer.convert_to_graph_documents #21482 since raw_schema is always a str @baskaryan
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Description
I am trying to load a page from Wikipedia, split it and load to Neo4j using langchain
Wikipedia --> WikipediaRetriever --> RecursiveCharacterTextSplitter --> LLMGraphTransformer --> Neo4jGraph
LLM used is Mistral 7B (using AWS Bedrock)
System Info
langchain==0.1.17
langchain-community==0.0.36
langchain-core==0.1.52
langchain-experimental==0.0.58
langchain-text-splitters==0.0.1
langsmith==0.1.52
platform : windows
Python 3.10.8
The text was updated successfully, but these errors were encountered: