Plugin configuration parameters
A Genkit plugin instance
import { genkit } from 'genkit';
import { weaviate } from 'genkitx-weaviate';
import { textEmbedding004 } from '@genkit-ai/vertexai';
const ai = genkit({
plugins: [
weaviate({
clientParams: {
host: 'localhost',
port: 8080,
grpcPort: 50051
},
collections: [
{
collectionName: 'Documents',
embedder: textEmbedding004
}
]
})
]
});
// Use the indexer
const indexer = weaviateIndexerRef({ collectionName: 'Documents' });
await ai.index({ indexer, documents });
// Use the retriever
const retriever = weaviateRetrieverRef({ collectionName: 'Documents' });
const results = await ai.retrieve({ retriever, query: 'search query' });
Weaviate plugin for Genkit.
This plugin provides indexer and retriever functionality for Weaviate vector database. It supports multiple collections, each with their own configuration.