Closed nerdai closed 2 days ago
ServiceComponent has the attribute of 'module_type', while RouterComponent does not have since it is NOT a ServiceComponent.
In the current examples/pipeline_human_local_single.py file, when creating QueryPipeline, an RouterComponent was passed in, vs ServiceComponent.
I did some testing, just commented out RouterCompoent, and pass in the two service components directly, and it seems to work in my local env and setup.
#################################### pipeline = QueryPipeline( chain=[ agent_component, human_component
# selector=PydanticSingleSelector.from_defaults(llm=OpenAI()),
# choices=[agent_service.description, human_service.description],
# components=[agent_component, human_component],
# )
]
)
Tested code above, and it worked as seen below. Created a PR #112 to merge.
When trying to run the script
examples/pipeline_human_local_single.py
, I get this error: