Class ManualAssistantFunction
java.lang.Object
ch.tocco.nice2.optional.aiassistant.impl.function.manual.ManualAssistantFunction
- All Implemented Interfaces:
AssistantFunction
MANUAL assistant function: answers from the manual chunks of the docs-retrieval-service (RAG).
In other languages than the manual's, the LLM looks up the software's terms with the
TextResourceSearchTool.-
Constructor Summary
ConstructorsConstructorDescriptionManualAssistantFunction(EmbeddingClient embeddingClient, DocsRetrievalClient docsRetrievalClient, ChatCompletionClient chatCompletionClient, ManualParameterProvider parameterProvider, TextResources textResources, TextResourceSearchService textResourceSearchService) -
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, TextResourceSearchService textResourceSearchService)
-
-
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
-