Method LoadFromStore
LoadFromStore(IVectorStore, string, LM, CancellationToken)
Loads a DataSource from the specified vector store using the provided data source identifier and language model. This is a synchronous wrapper around the asynchronous LoadFromStoreAsync(IVectorStore, string, LM, CancellationToken) method.
public static DataSource LoadFromStore(IVectorStore vectorStore, string dataSourceIdentifier, LM model, CancellationToken cancellationToken = default)
Parameters
vectorStore
IVectorStoreThe vector store implementation to retrieve the data source from.
dataSourceIdentifier
stringThe unique identifier of the data source to load.
model
LMThe language model to be associated with the data source.
cancellationToken
CancellationTokenA token to cancel the asynchronous operation.
Returns
- DataSource
A DataSource instance loaded from the vector store.
Exceptions
- Exception
Any exception encountered during the asynchronous operation is thrown.