(providerType database.AIProviderType)
| 185 | } |
| 186 | |
| 187 | func fantasyConfigForAIBridge(providerType database.AIProviderType) aibridgeFantasyConfig { |
| 188 | var fantasyProvider string |
| 189 | baseURL := aibridgeLocalBaseURL + "/v1" |
| 190 | switch providerType { |
| 191 | case database.AiProviderTypeAnthropic, database.AiProviderTypeBedrock: |
| 192 | fantasyProvider = fantasyanthropic.Name |
| 193 | baseURL = aibridgeLocalBaseURL |
| 194 | case database.AiProviderTypeOpenai: |
| 195 | fantasyProvider = fantasyopenai.Name |
| 196 | default: |
| 197 | fantasyProvider = fantasyopenaicompat.Name |
| 198 | } |
| 199 | return aibridgeFantasyConfig{ |
| 200 | ProviderHint: fantasyProvider, |
| 201 | Keys: chatprovider.ProviderAPIKeys{ |
| 202 | ByProvider: map[string]string{ |
| 203 | fantasyProvider: aibridgePlaceholderAPIKey, |
| 204 | }, |
| 205 | BaseURLByProvider: map[string]string{ |
| 206 | fantasyProvider: baseURL, |
| 207 | }, |
| 208 | }, |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | func aiGatewayRequestFormatForProviderType(providerType database.AIProviderType) aiGatewayRequestFormat { |
| 213 | switch providerType { |
no outgoing calls