(backend: 'openai' | 'openrouter')
| 44 | } |
| 45 | |
| 46 | export function getBackendUrls(backend: 'openai' | 'openrouter') { |
| 47 | let baseURL; |
| 48 | if (backend == 'openai') { |
| 49 | baseURL = 'https://api.openai.com/v1/'; |
| 50 | } else { |
| 51 | baseURL = 'https://openrouter.ai/api/v1'; |
| 52 | } |
| 53 | return baseURL; |
| 54 | } |
| 55 | |
| 56 | export function getApikey(chatState: ChatStateType) { |
| 57 | return getBackendUrls('openai') == chatState.baseURL |
no outgoing calls
no test coverage detected