Building an Agent around a Query Pipeline #16077
Replies: 1 comment 6 replies
-
To resolve the "Circular reference detected" error when building a React agent around a query pipeline, you need to ensure that there are no circular dependencies in your query pipeline configuration. Here is how you can set up the query pipeline correctly:
By following these steps, you should be able to avoid circular references in your query pipeline configuration. Additionally, ensure that each component in the pipeline is correctly defined and does not inadvertently reference another component in a way that creates a loop. For more detailed examples and setup, you can refer to the LlamaIndex documentation [1][2]. |
Beta Was this translation helpful? Give feedback.
-
I am trying to follow along the example provided for building a react agent around a query pipeline (https://docs.llamaindex.ai/en/stable/examples/agent/agent_runner/query_pipeline_agent/) . Running into this error when i pass any query to the agent:
ERROR:openinference.instrumentation.llama_index._handler:Error serializing to JSON: ValueError: Circular reference detected (id repeated)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/openinference/instrumentation/llama_index/_handler.py", line 250, in process_output
self[OUTPUT_VALUE] = result.model_dump_json(exclude_unset=True)
File "/usr/local/lib/python3.10/dist-packages/pydantic/main.py", line 438, in model_dump_json
return self.pydantic_serializer.to_json(
pydantic_core._pydantic_core.PydanticSerializationError: Error serializing to JSON: ValueError: Circular reference detected (id repeated)
Beta Was this translation helpful? Give feedback.
All reactions