Default Vector Client
class DefaultVectorClient(vectorClientProperties: DefaultVectorClientProperties, embeddingClient: EmbeddingClient = DefaultEmbeddingClient(
HttpClient(),
DefaultEmbeddingClientProperties(),
)) : VectorSearchClient, VectorSeedClient
The default implementation of the VectorSearchClient and VectorSeedClient.
This implementation keeps a list of documents and searches for the most similar document based on the cosine similarity of the embeddings. The documents are seeded using the seed method and kept in memory. This implementation is not meant for production use and is only for demonstration purposes.
Parameters
vector Client Properties
The properties for the client.
embedding Client
The embedding client.
See also
Constructors
Link copied to clipboard
constructor(vectorClientProperties: DefaultVectorClientProperties, embeddingClient: EmbeddingClient = DefaultEmbeddingClient(
HttpClient(),
DefaultEmbeddingClientProperties(),
))
Functions
Link copied to clipboard
open override fun find(request: VectorSearchClientRequest, agentRoutingSpecs: Set<AgentRoutingSpec>): Result<VectorSearchClientResponse?, VectorClientException>
Link copied to clipboard