:mag: AI orchestration framework to build customizable, production-ready LLM applications. Connect components (models, vector DBs, file converters) to pipelines or agents that can interact with your data. With advanced retrieval methods, it's best suited for building RAG, question answering, semantic search or conversational agent chatbots.
After some discussion we decided to add back the unsafe behaviour in ConditionalRouter and OutputAdapter that was removed with #8095.
This PR adds an unsafe init argument for both Component that will enable the previous behaviour. unsafe defaults to False, so the user must explictly set it to True to use the previous behaviour.
We recommend not enabling unsafe behaviour if the Jinja template sources are not trusted.
PromptBuilder, ChatPromptBuilder, DynamicPromptBuilder and DynamicChatPromptBuilder were also changed in the previous PR but it doesn't make sense to enable the unsafe behaviour for those Component so we leave them as is.
How did you test it?
I added new tests and run tests locally.
Notes for the reviewer
We'll need to update the ConditionalRouter and OutputAdapter documentation to make the unsafe behaviour clear and to explain when it must not be enabled.
Related Issues
Proposed Changes:
After some discussion we decided to add back the unsafe behaviour in
ConditionalRouter
andOutputAdapter
that was removed with #8095.This PR adds an
unsafe
init argument for both Component that will enable the previous behaviour.unsafe
defaults toFalse
, so the user must explictly set it toTrue
to use the previous behaviour.We recommend not enabling
unsafe
behaviour if the Jinja template sources are not trusted.PromptBuilder
,ChatPromptBuilder
,DynamicPromptBuilder
andDynamicChatPromptBuilder
were also changed in the previous PR but it doesn't make sense to enable the unsafe behaviour for those Component so we leave them as is.How did you test it?
I added new tests and run tests locally.
Notes for the reviewer
We'll need to update the
ConditionalRouter
andOutputAdapter
documentation to make the unsafe behaviour clear and to explain when it must not be enabled.Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
.