Interface ContentInjector
- All Known Implementing Classes:
DefaultContentInjector
public interface ContentInjector
Injects given
The goal is to format and incorporate the
Contents into a given UserMessage.
The goal is to format and incorporate the
Contents into the original UserMessage
enabling the LLM to utilize it for generating a grounded response.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault ChatMessageinject(List<Content> contents, ChatMessage chatMessage) Injects givenContents into a givenChatMessage.inject(List<Content> contents, UserMessage userMessage) Deprecated.
-
Method Details
-
inject
Injects givenContents into a givenChatMessage.
This method has a default implementation in order to temporarily support current custom implementations ofContentInjector. The default implementation will be removed soon.- Parameters:
contents- The list ofContentto be injected.chatMessage- TheChatMessageinto which theContents are to be injected. Can be either aUserMessageor aSystemMessage.- Returns:
- The
UserMessagewith the injectedContents.
-
inject
Deprecated.Use/implementinject(List, ChatMessage)instead.Injects givenContents into a givenUserMessage.- Parameters:
contents- The list ofContentto be injected.userMessage- TheUserMessageinto which theContents are to be injected.- Returns:
- The
UserMessagewith the injectedContents.
-
inject(List, ChatMessage)instead.