-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Allow Chat Generators to connect to Answer Builder #7839
Comments
would also like to add that i have implemented this locally for my hyrbrid pipeline that utilizes LlamaCppChatGenerator and the new ChatPromptBuilder. Everything seems to work. It's just lacking the .meta support, but that can be added at a different time if needed. |
@lbux What approach did you use? Did you create a custom component? |
@anakin87 There is no need to write an additional component. A |
Is your feature request related to a problem? Please describe.
There is no current way for a
ChatGenerator
to directly connect toAnswerBuilder()
despite similar functionality to a regular Generator.Describe the solution you'd like
We can extract the text from a
ChatMessage
and use it as astr
as expected in the code for AnswerBuilder.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
ChatGenerators that rely on non-open ai models require a specific chat format to be applied to properly differentiate between system/user/assistant messages. This is done manually (and prone to errors) in regular generators. This is an example I pulled from a Haystack notebook:
This can be accomplished by using a
ChatGenerator
as follows:We can then add the output to an
AnswerBuilder
to complete a pipeline ensuring that the proper template is applied.The text was updated successfully, but these errors were encountered: