@@ -145,6 +145,9 @@ func (i *implementerCollection) CreateCollection(ctx context.Context, name strin
145
145
req .Embedding .Field = param .Embedding .Field
146
146
req .Embedding .VectorField = param .Embedding .VectorField
147
147
req .Embedding .Model = string (param .Embedding .Model )
148
+ if param .Embedding .ModelName != "" {
149
+ req .Embedding .Model = param .Embedding .ModelName
150
+ }
148
151
}
149
152
if param .TtlConfig != nil {
150
153
req .TtlConfig = new (collection.TtlConfig )
@@ -315,6 +318,7 @@ func (i *implementerCollection) toCollection(collectionItem *collection.Describe
315
318
coll .Embedding .Field = collectionItem .Embedding .Field
316
319
coll .Embedding .VectorField = collectionItem .Embedding .VectorField
317
320
coll .Embedding .Model = EmbeddingModel (collectionItem .Embedding .Model )
321
+ coll .Embedding .ModelName = collectionItem .Embedding .Model
318
322
coll .Embedding .Enabled = collectionItem .Embedding .Status == "enabled"
319
323
}
320
324
if collectionItem .TtlConfig != nil {
@@ -459,10 +463,12 @@ func (c *Collection) WithTimeout(t time.Duration) {
459
463
}
460
464
461
465
type Embedding struct {
462
- Field string `json:"field,omitempty"`
463
- VectorField string `json:"vectorField,omitempty"`
464
- Model EmbeddingModel `json:"model,omitempty"`
465
- Enabled bool `json:"enabled,omitempty"` // 返回数据
466
+ Field string `json:"field,omitempty"`
467
+ VectorField string `json:"vectorField,omitempty"`
468
+ // Deprecated: Use ModelName instead.
469
+ Model EmbeddingModel `json:"model,omitempty"`
470
+ ModelName string `json:"modelName,omitempty"`
471
+ Enabled bool `json:"enabled,omitempty"` // 返回数据
466
472
}
467
473
468
474
type IndexStatus struct {
0 commit comments