Add api_key mapping in VectorStoreConfig conversion

- Introduced mapping for the api_key field in the toVectorStoreConfig method to enhance configuration handling.
- This addition allows for the inclusion of the api_key in the extraParams, improving the flexibility of the configuration process.
This commit is contained in:
Max 2025-11-03 15:38:42 +08:00
parent 3b26873d56
commit 72fe081a28

View file

@ -139,6 +139,11 @@ func (c *Config) toVectorStoreConfig() (types.VectorStoreConfig, error) {
extraParams["port"] = port
}
// Map api_key field
if apiKey, exists := configCopy["api_key"]; exists {
extraParams["api_key"] = apiKey
}
// Convert config to types.VectorStoreConfig via JSON
jsonData, err := json.Marshal(configCopy)
if err != nil {