Documentation
¶
Index ¶
- type MockLLMClient
- type MockVectorDBClient
- func (m *MockVectorDBClient) CollectionExists(ctx context.Context, name string) (bool, error)
- func (m *MockVectorDBClient) CreateCollection(ctx context.Context, name string, schema *vectordb.CollectionSchema) error
- func (m *MockVectorDBClient) CreateDocument(ctx context.Context, collectionName string, document *vectordb.Document) error
- func (m *MockVectorDBClient) CreateDocuments(ctx context.Context, collectionName string, documents []*vectordb.Document) error
- func (m *MockVectorDBClient) DeleteCollection(ctx context.Context, name string) error
- func (m *MockVectorDBClient) DeleteDocument(ctx context.Context, collectionName, documentID string) error
- func (m *MockVectorDBClient) DeleteDocuments(ctx context.Context, collectionName string, documentIDs []string) error
- func (m *MockVectorDBClient) DeleteDocumentsByMetadata(ctx context.Context, collectionName string, metadata map[string]interface{}) error
- func (m *MockVectorDBClient) GetCollectionCount(ctx context.Context, name string) (int64, error)
- func (m *MockVectorDBClient) GetDefaultSchema(schemaType vectordb.SchemaType, collectionName string) *vectordb.CollectionSchema
- func (m *MockVectorDBClient) GetDocument(ctx context.Context, collectionName, documentID string) (*vectordb.Document, error)
- func (m *MockVectorDBClient) GetSchema(ctx context.Context, collectionName string) (*vectordb.CollectionSchema, error)
- func (m *MockVectorDBClient) Health(ctx context.Context) error
- func (m *MockVectorDBClient) ListCollections(ctx context.Context) ([]vectordb.CollectionInfo, error)
- func (m *MockVectorDBClient) ListDocuments(ctx context.Context, collectionName string, limit int, offset int) ([]*vectordb.Document, error)
- func (m *MockVectorDBClient) SearchBM25(ctx context.Context, collectionName, query string, ...) ([]*vectordb.QueryResult, error)
- func (m *MockVectorDBClient) SearchByMetadata(ctx context.Context, collectionName string, metadata map[string]interface{}, ...) ([]*vectordb.QueryResult, error)
- func (m *MockVectorDBClient) SearchHybrid(ctx context.Context, collectionName, query string, ...) ([]*vectordb.QueryResult, error)
- func (m *MockVectorDBClient) SearchSemantic(ctx context.Context, collectionName, query string, ...) ([]*vectordb.QueryResult, error)
- func (m *MockVectorDBClient) UpdateDocument(ctx context.Context, collectionName string, document *vectordb.Document) error
- func (m *MockVectorDBClient) UpdateSchema(ctx context.Context, collectionName string, schema *vectordb.CollectionSchema) error
- func (m *MockVectorDBClient) ValidateSchema(schema *vectordb.CollectionSchema) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockLLMClient ¶
MockLLMClient is a mock implementation of llm.Client for testing
func (*MockLLMClient) Complete ¶
func (m *MockLLMClient) Complete(ctx context.Context, prompt string, opts ...llm.Option) (string, error)
Complete mocks the Complete method
func (*MockLLMClient) CompleteStructured ¶
func (m *MockLLMClient) CompleteStructured(ctx context.Context, prompt string, schema interface{}, opts ...llm.Option) (interface{}, error)
CompleteStructured mocks the CompleteStructured method
func (*MockLLMClient) GetMetrics ¶
func (m *MockLLMClient) GetMetrics() *llm.Metrics
GetMetrics mocks the GetMetrics method
type MockVectorDBClient ¶
MockVectorDBClient is a mock implementation of vectordb.VectorDBClient for testing
func (*MockVectorDBClient) CollectionExists ¶
CollectionExists mocks the CollectionExists method
func (*MockVectorDBClient) CreateCollection ¶
func (m *MockVectorDBClient) CreateCollection(ctx context.Context, name string, schema *vectordb.CollectionSchema) error
CreateCollection mocks the CreateCollection method
func (*MockVectorDBClient) CreateDocument ¶
func (m *MockVectorDBClient) CreateDocument(ctx context.Context, collectionName string, document *vectordb.Document) error
CreateDocument mocks the CreateDocument method
func (*MockVectorDBClient) CreateDocuments ¶
func (m *MockVectorDBClient) CreateDocuments(ctx context.Context, collectionName string, documents []*vectordb.Document) error
CreateDocuments mocks the CreateDocuments method
func (*MockVectorDBClient) DeleteCollection ¶
func (m *MockVectorDBClient) DeleteCollection(ctx context.Context, name string) error
DeleteCollection mocks the DeleteCollection method
func (*MockVectorDBClient) DeleteDocument ¶
func (m *MockVectorDBClient) DeleteDocument(ctx context.Context, collectionName, documentID string) error
DeleteDocument mocks the DeleteDocument method
func (*MockVectorDBClient) DeleteDocuments ¶
func (m *MockVectorDBClient) DeleteDocuments(ctx context.Context, collectionName string, documentIDs []string) error
DeleteDocuments mocks the DeleteDocuments method
func (*MockVectorDBClient) DeleteDocumentsByMetadata ¶
func (m *MockVectorDBClient) DeleteDocumentsByMetadata(ctx context.Context, collectionName string, metadata map[string]interface{}) error
DeleteDocumentsByMetadata mocks the DeleteDocumentsByMetadata method
func (*MockVectorDBClient) GetCollectionCount ¶
GetCollectionCount mocks the GetCollectionCount method
func (*MockVectorDBClient) GetDefaultSchema ¶
func (m *MockVectorDBClient) GetDefaultSchema(schemaType vectordb.SchemaType, collectionName string) *vectordb.CollectionSchema
GetDefaultSchema mocks the GetDefaultSchema method
func (*MockVectorDBClient) GetDocument ¶
func (m *MockVectorDBClient) GetDocument(ctx context.Context, collectionName, documentID string) (*vectordb.Document, error)
GetDocument mocks the GetDocument method
func (*MockVectorDBClient) GetSchema ¶
func (m *MockVectorDBClient) GetSchema(ctx context.Context, collectionName string) (*vectordb.CollectionSchema, error)
GetSchema mocks the GetSchema method
func (*MockVectorDBClient) Health ¶
func (m *MockVectorDBClient) Health(ctx context.Context) error
Health mocks the Health method
func (*MockVectorDBClient) ListCollections ¶
func (m *MockVectorDBClient) ListCollections(ctx context.Context) ([]vectordb.CollectionInfo, error)
ListCollections mocks the ListCollections method
func (*MockVectorDBClient) ListDocuments ¶
func (m *MockVectorDBClient) ListDocuments(ctx context.Context, collectionName string, limit int, offset int) ([]*vectordb.Document, error)
ListDocuments mocks the ListDocuments method
func (*MockVectorDBClient) SearchBM25 ¶
func (m *MockVectorDBClient) SearchBM25(ctx context.Context, collectionName, query string, options *vectordb.QueryOptions) ([]*vectordb.QueryResult, error)
SearchBM25 mocks the SearchBM25 method
func (*MockVectorDBClient) SearchByMetadata ¶
func (m *MockVectorDBClient) SearchByMetadata(ctx context.Context, collectionName string, metadata map[string]interface{}, options *vectordb.QueryOptions) ([]*vectordb.QueryResult, error)
SearchByMetadata mocks the SearchByMetadata method
func (*MockVectorDBClient) SearchHybrid ¶
func (m *MockVectorDBClient) SearchHybrid(ctx context.Context, collectionName, query string, options *vectordb.QueryOptions) ([]*vectordb.QueryResult, error)
SearchHybrid mocks the SearchHybrid method
func (*MockVectorDBClient) SearchSemantic ¶
func (m *MockVectorDBClient) SearchSemantic(ctx context.Context, collectionName, query string, options *vectordb.QueryOptions) ([]*vectordb.QueryResult, error)
SearchSemantic mocks the SearchSemantic method
func (*MockVectorDBClient) UpdateDocument ¶
func (m *MockVectorDBClient) UpdateDocument(ctx context.Context, collectionName string, document *vectordb.Document) error
UpdateDocument mocks the UpdateDocument method
func (*MockVectorDBClient) UpdateSchema ¶
func (m *MockVectorDBClient) UpdateSchema(ctx context.Context, collectionName string, schema *vectordb.CollectionSchema) error
UpdateSchema mocks the UpdateSchema method
func (*MockVectorDBClient) ValidateSchema ¶
func (m *MockVectorDBClient) ValidateSchema(schema *vectordb.CollectionSchema) error
ValidateSchema mocks the ValidateSchema method