Merge pull request #1262 from trheyi/main

Add api_key mapping in VectorStoreConfig conversion
This commit is contained in:
Max 2025-11-03 15:40:17 +08:00 committed by GitHub
commit b6df16e0a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -139,6 +139,11 @@ func (c *Config) toVectorStoreConfig() (types.VectorStoreConfig, error) {
extraParams["port"] = port 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 // Convert config to types.VectorStoreConfig via JSON
jsonData, err := json.Marshal(configCopy) jsonData, err := json.Marshal(configCopy)
if err != nil { if err != nil {