Class DocsRetrievalClient
java.lang.Object
ch.tocco.nice2.optional.aiassistant.impl.function.manual.DocsRetrievalClient
Client for the docs-retrieval-service, which owns the manual's vector DB and returns the most
relevant chunks for a query vector. It generates no answers and hosts no model.
POST {baseUrl}/retrieve { vector, version?, language?, topK? } -> { results: [...] }
GET {baseUrl}/health -> { status: "ok", db: true }
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final record -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription
-
Constructor Details
-
DocsRetrievalClient
-
-
Method Details
-
retrieve
public List<DocsRetrievalClient.Result> retrieve(float[] vector, @Nullable String version, @Nullable String language) - Returns:
- the relevant manual chunks for the query vector, ordered by relevance
- Throws:
AiAssistantException- if the service is unreachable or returns a non-2xx status
-