I am using the custom Tongyi llm
from langchain_community.chat_models.tongyi import ChatTongyi
I found that there are nodes and relationships in the model response in langchain smith but there is no related data in the neo4j, do I need to define the schema manually every time, if so, how to set up automatic extraction and then store it?
2024-07-22 13:41:00,912 - Exception in post_processing tasks: {code: Neo.ClientError.Procedure.ProcedureCallFailed} {message: Failed to invoke procedure `db.index.vector.queryNodes`: Caused by: java.lang.IllegalArgumentException: Index query vector has 1024 dimensions, but indexed vectors have 384.}
Traceback (most recent call last):
File "/Users/kain/cct_project/llm-graph-builder/backend/score.py", line 257, in post_processing
await asyncio.to_thread(update_graph, graph)
File "/Users/kain/.pyenv/versions/3.10.13/lib/python3.10/asyncio/threads.py", line 25, in to_thread
return await loop.run_in_executor(None, func_call)
File "/Users/kain/.pyenv/versions/3.10.13/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/Users/kain/cct_project/llm-graph-builder/backend/src/main.py", line 428, in update_graph
graph_DB_dataAccess.update_KNN_graph()
File "/Users/kain/cct_project/llm-graph-builder/backend/src/graphDB_dataAccess.py", line 134, in update_KNN_graph
self.graph.query("""MATCH (c:Chunk)
File "/Users/kain/cct_project/llm-graph-builder/backend/venv/lib/python3.10/site-packages/langchain_community/graphs/neo4j_graph.py", line 419, in query
data = session.run(Query(text=query, timeout=self.timeout), params)
File "/Users/kain/cct_project/llm-graph-builder/backend/venv/lib/python3.10/site-packages/neo4j/_sync/work/session.py", line 314, in run
self._auto_result._run(
File "/Users/kain/cct_project/llm-graph-builder/backend/venv/lib/python3.10/site-packages/neo4j/_sync/work/result.py", line 221, in _run
self._attach()
File "/Users/kain/cct_project/llm-graph-builder/backend/venv/lib/python3.10/site-packages/neo4j/_sync/work/result.py", line 409, in _attach
self._connection.fetch_message()
File "/Users/kain/cct_project/llm-graph-builder/backend/venv/lib/python3.10/site-packages/neo4j/_sync/io/_common.py", line 178, in inner
func(*args, **kwargs)
File "/Users/kain/cct_project/llm-graph-builder/backend/venv/lib/python3.10/site-packages/neo4j/_sync/io/_bolt.py", line 855, in fetch_message
res = self._process_message(tag, fields)
File "/Users/kain/cct_project/llm-graph-builder/backend/venv/lib/python3.10/site-packages/neo4j/_sync/io/_bolt5.py", line 370, in _process_message
response.on_failure(summary_metadata or {})
File "/Users/kain/cct_project/llm-graph-builder/backend/venv/lib/python3.10/site-packages/neo4j/_sync/io/_common.py", line 245, in on_failure
raise Neo4jError.hydrate(**metadata)
neo4j.exceptions.ClientError: {code: Neo.ClientError.Procedure.ProcedureCallFailed} {message: Failed to invoke procedure `db.index.vector.queryNodes`: Caused by: java.lang.IllegalArgumentException: Index query vector has 1024 dimensions, but indexed vectors have 384.}
2024-07-22 13:41:01,137 - closing connection for post_processing api
I am using the custom Tongyi llm
from langchain_community.chat_models.tongyi import ChatTongyi
I found that there are nodes and relationships in the model response in langchain smith but there is no related data in the neo4j, do I need to define the schema manually every time, if so, how to set up automatic extraction and then store it?