1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
//! Milvus Vector Database Provider
//!
//! Milvus is an open-source vector database designed for AI applications,
//! providing high-performance similarity search and vector storage.
//!
//! This provider enables integration with Milvus for:
//! - Vector storage and retrieval
//! - Similarity search
//! - Collection management
//! - Embedding storage (embeddings must be generated by another provider)
//!
//! ## Features
//!
//! - **Vector Insert**: Store embeddings with metadata
//! - **Similarity Search**: Find similar vectors with filtering
//! - **Collection Management**: Work with multiple collections
//! - **Authentication**: Support for token and basic auth
//!
//! ## Example Usage
//!
//! ```rust,ignore
//! use litellm_rs::core::providers::milvus::{MilvusProvider, MilvusConfig};
//!
//! // Create provider
//! let config = MilvusConfig::new("localhost")
//! .with_collection("my_embeddings")
//! .with_token("my-token");
//!
//! let provider = MilvusProvider::new(config).await?;
//!
//! // Insert vectors (embeddings from another provider)
//! let vectors = vec![vec![0.1, 0.2, 0.3, 0.4]];
//! provider.insert_vectors("my_collection", vectors, None).await?;
//!
//! // Search for similar vectors
//! let query = vec![0.1, 0.2, 0.3, 0.4];
//! let results = provider.search_vectors("my_collection", query, 10, None, None).await?;
//! ```
//!
//! ## Configuration
//!
//! Environment variables:
//! - `MILVUS_HOST`: Server host (default: localhost)
//! - `MILVUS_PORT`: Server port (default: 19530)
//! - `MILVUS_COLLECTION`: Default collection name
//! - `MILVUS_DATABASE`: Database name
//! - `MILVUS_USERNAME`: Username for basic auth
//! - `MILVUS_PASSWORD`: Password for basic auth
//! - `MILVUS_TOKEN`: API token for bearer auth
//! - `MILVUS_USE_HTTPS`: Use HTTPS (default: false)
//!
//! ## Note
//!
//! Milvus is a vector database, not an embedding model provider. To generate
//! embeddings, use another provider like OpenAI, Voyage, or Cohere, then store
//! them in Milvus for efficient similarity search.
//!
//! Reference: <https://milvus.io/docs/restful_api.md>
// Re-export main types for external use
pub use MilvusConfig;
pub use MilvusError;
pub use ;
pub use ;