-
Notifications
You must be signed in to change notification settings - Fork 0
ExtensionsVectorData lodestarvectorstore getservice
Development build. This page describes
main, not a released package. The latest published Lodestar.Extensions.VectorData is 0.1.0 — read its documentation.
Home › ExtensionsVectorData › Vector store
Answers for the store's metadata.
public object GetService(Type serviceType, object serviceKey = null)Parameters — serviceType is the service being asked for. serviceKey names a keyed
registration; nothing here is registered under one, so a keyed lookup answers null.
Exceptions — ArgumentNullException when serviceType is null.
Returns — a VectorStoreMetadata whose VectorStoreSystemName is lodestar when serviceType
is that type and serviceKey is null; null for anything else.
Example — identifying the provider through the abstraction.
using Lodestar.Extensions.VectorData;
using Microsoft.Extensions.VectorData;
using VectorStore store = new LodestarVectorStore();
var about = (VectorStoreMetadata)store.GetService(typeof(VectorStoreMetadata));
string system = about.VectorStoreSystemName; // => lodestarRemarks — service resolution is how Microsoft.Extensions.VectorData lets a consumer learn which
provider it holds without referencing the provider's types. VectorStoreName is not set: an
in-process store has no database name to report.
A new metadata object is returned on each call. A null serviceType throws, as the abstraction's
contract for GetService says it must.
Applies to — net10.0, netstandard2.0.
See also — LodestarVectorStoreCollection.GetService,
LodestarVectorStore.