| 581 | } |
| 582 | |
| 583 | func providerInputFromEndpoint(name string, endpoint providers.Endpoint) appapi.ProviderInput { |
| 584 | return appapi.ProviderInput{ |
| 585 | Name: name, |
| 586 | Endpoint: endpoint.Endpoint, |
| 587 | APIKey: endpoint.APIKey, |
| 588 | APIKeyEnv: endpoint.APIKeyEnv, |
| 589 | SupportedClient: endpoint.SupportedClient, |
| 590 | Models: append([]string(nil), endpoint.Models...), |
| 591 | ListModelsCmd: endpoint.ListModelsCmd, |
| 592 | KeepProxyConfig: endpoint.KeepProxyConfig, |
| 593 | UseProxy: endpoint.UseProxy, |
| 594 | Enabled: endpoint.Enabled, |
| 595 | Description: endpoint.Description, |
| 596 | } |
| 597 | } |
| 598 | |
| 599 | func providerPatchFromEndpoint(endpoint providers.Endpoint) appapi.ProviderPatch { |
| 600 | endpointURL := endpoint.Endpoint |