Update collection tests to reflect new embedding provider configuration
- Modified test cases for CreateCollection, RemoveCollection, and CollectionIntegration to use the new embedding provider and option values. - Removed outdated fields related to the previous embedding model and added locale support for provider reading. - Ensured consistency in the configuration structure across all relevant tests.
This commit is contained in:
parent
b7ad7bfed7
commit
fe49cc5fa1
1 changed files with 15 additions and 19 deletions
|
|
@ -45,13 +45,11 @@ func TestCreateCollection(t *testing.T) {
|
|||
"created_by": "test_user",
|
||||
},
|
||||
"config": map[string]interface{}{
|
||||
"collection_name": testCollectionID + "_vector", // Required: collection name
|
||||
"embedding_model": "text-embedding-ada-002",
|
||||
"chunk_size": 1000,
|
||||
"chunk_overlap": 200,
|
||||
"index_type": "hnsw", // Required: valid index type
|
||||
"distance": "cosine", // Required: distance metric
|
||||
"dimension": 1536, // Required: embedding dimensions (note: singular not plural)
|
||||
"embedding_provider": "__yao.openai", // Required: embedding provider ID
|
||||
"embedding_option": "text-embedding-3-small", // Required: embedding option value
|
||||
"locale": "en", // Optional: locale for provider reading
|
||||
"index_type": "hnsw", // Required: valid index type
|
||||
"distance": "cosine", // Required: distance metric
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -171,11 +169,11 @@ func TestRemoveCollection(t *testing.T) {
|
|||
"category": "test_remove",
|
||||
},
|
||||
"config": map[string]interface{}{
|
||||
"collection_name": testCollectionID + "_vector",
|
||||
"embedding_model": "text-embedding-ada-002",
|
||||
"index_type": "hnsw",
|
||||
"distance": "cosine",
|
||||
"dimension": 1536,
|
||||
"embedding_provider": "__yao.openai", // Required: embedding provider ID
|
||||
"embedding_option": "text-embedding-3-small", // Required: embedding option value
|
||||
"locale": "en", // Optional: locale for provider reading
|
||||
"index_type": "hnsw", // Required: valid index type
|
||||
"distance": "cosine", // Required: distance metric
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -503,13 +501,11 @@ func TestCollectionIntegration(t *testing.T) {
|
|||
"purpose": "full_lifecycle_test",
|
||||
},
|
||||
"config": map[string]interface{}{
|
||||
"collection_name": testCollectionID + "_vector",
|
||||
"embedding_model": "text-embedding-ada-002",
|
||||
"chunk_size": 1000,
|
||||
"chunk_overlap": 200,
|
||||
"index_type": "hnsw",
|
||||
"distance": "cosine",
|
||||
"dimension": 1536,
|
||||
"embedding_provider": "__yao.openai", // Required: embedding provider ID
|
||||
"embedding_option": "text-embedding-3-small", // Required: embedding option value
|
||||
"locale": "en", // Optional: locale for provider reading
|
||||
"index_type": "hnsw", // Required: valid index type
|
||||
"distance": "cosine", // Required: distance metric
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue