| 150 | * Resolves the secret key based on the selected API, chat completion source, and text completion type. | 150 | * Resolves the secret key based on the selected API, chat completion source, and text completion type. |
| 151 | * @returns {string|null} The secret key corresponding to the selected API, or null if no key is found. | 151 | * @returns {string|null} The secret key corresponding to the selected API, or null if no key is found. |
| 152 | */ | 152 | */ |
| 153 | function resolveSecretKey() { | 153 | export function resolveSecretKey() { |
| 154 | const { mainApi, chatCompletionSettings, textCompletionSettings } = SillyTavern.getContext(); | 154 | const { mainApi, chatCompletionSettings, textCompletionSettings } = SillyTavern.getContext(); |
| 155 | const chatCompletionSource = chatCompletionSettings.chat_completion_source; | 155 | const chatCompletionSource = chatCompletionSettings.chat_completion_source; |
| 156 | const textCompletionType = textCompletionSettings.type; | 156 | const textCompletionType = textCompletionSettings.type; |