Class ManualAssistantFunction
java.lang.Object
ch.tocco.nice2.optional.aiassistant.impl.function.manual.ManualAssistantFunction
- All Implemented Interfaces:
AssistantFunction
MANUAL assistant function: RAG over the Tocco manual. Embeds the question, retrieves the most
relevant manual chunks from the docs-retrieval-service, builds a grounding prompt and asks the
generation LLM for an answer with its source pages.
-
Constructor Summary
ConstructorsConstructorDescriptionManualAssistantFunction(EmbeddingClient embeddingClient, DocsRetrievalClient docsRetrievalClient, ChatCompletionClient chatCompletionClient, ManualParameterProvider parameterProvider, TextResources textResources) -
Method Summary
Modifier and TypeMethodDescriptionanswer(ChatRequest request) Produce an answer for one chat turn; the prior conversation is inrequest.history().type()Stable discriminator persisted on the conversation and sent by the client, e.g.
-
Constructor Details
-
ManualAssistantFunction
public ManualAssistantFunction(EmbeddingClient embeddingClient, DocsRetrievalClient docsRetrievalClient, ChatCompletionClient chatCompletionClient, ManualParameterProvider parameterProvider, TextResources textResources)
-
-
Method Details
-
type
Description copied from interface:AssistantFunctionStable discriminator persisted on the conversation and sent by the client, e.g."MANUAL".- Specified by:
typein interfaceAssistantFunction
-
answer
Description copied from interface:AssistantFunctionProduce an answer for one chat turn; the prior conversation is inrequest.history().- Specified by:
answerin interfaceAssistantFunction- Throws:
AiAssistantException- if the retrieval service is down or an embedding/generation call fails
-