Merge pull request #1262 from trheyi/main
Add api_key mapping in VectorStoreConfig conversion
This commit is contained in:
commit
b6df16e0a4
1 changed files with 5 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue