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