symfony/ai-milvus-store
Milvus Store adds Milvus vector database support to Symfony AI Store. Connect to a Milvus instance, create collections, insert vectors, run similarity searches, and apply boolean filter expressions using Milvus REST APIs.
AiClient, EmbeddingGenerator, and Retriever components. This ensures consistency with existing AI workflows (e.g., embedding generation, retrieval-augmented generation).user_id, timestamp) critical for filtering? How will they be indexed?Retriever, EmbeddingGenerator) will use this store? Are there conflicting dependencies (e.g., other vector store packages)?symfony/ai. Integrates with:
config/packages/ai.yaml with minimal boilerplate.Dependency Addition:
composer require symfony/ai-milvus-store
symfony/ai version (target: v0.8.0+).Configuration Setup:
# config/packages/ai.yaml
framework:
ai:
stores:
milvus:
type: MilvusStore
uri: "http://milvus:19530" # Milvus server endpoint
collection: "app_vectors" # Target collection name
options:
consistency_level: "Strong" # Strong/Eventual
timeout: 5.0 # API timeout (seconds)
retry_policy:
max_attempts: 3
delay: 100 # ms between retries
Schema Definition:
{
"collection_name": "app_vectors",
"description": "Symfony AI embeddings",
"auto_id": false,
"fields": [
{"name": "id", "type": "INT64", "is_primary": true, "auto_id": false},
{"name": "embedding", "type": "FLOAT_VECTOR", "dim": 768},
{"name": "metadata", "type": "JSON"},
{"name": "created_at", "type": "TIMESTAMP"}
],
"indexes": [
{
"index_name": "vector_idx",
"field_name": "embedding",
"index_type": "IVF_FLAT",
"params": {"nlist": 1024}
}
]
}
DESCRIBE COLLECTION.Service Integration:
use Symfony\AI\Store\MilvusStore;
// In a controller or service:
$store = $container->get(MilvusStore::class);
$vectors = $store->insert([...]); // Insert embeddings
$results = $store->search($queryVector, 10); // Nearest neighbors
AiClient configurations.Testing:
symfony/ai. Check for breaking changes in minor updates.pdo_sqlite for fallback stores).# config/packages/messenger.yaml
framework:
messenger:
transports:
milvus_async: "%env(MIL
How can I help you explore Laravel packages today?