mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Dynamic toggling of chat completion forms
This commit is contained in:
@ -1344,7 +1344,7 @@
|
||||
<option value="windowai">Window.ai</option>
|
||||
<option value="claude">Claude</option>
|
||||
</select>
|
||||
<form id="openai_form">
|
||||
<form id="openai_form" data-source="openai">
|
||||
<h4>OpenAI API key</h4>
|
||||
<span>
|
||||
<ol>
|
||||
@ -1375,7 +1375,7 @@
|
||||
<a id="openai_api_usage" href="javascript:void(0);">View API Usage Metrics</a>
|
||||
</div>
|
||||
</form>
|
||||
<form id="claude_form">
|
||||
<form id="claude_form" data-source="claude">
|
||||
<h4>Claude API Key</h4>
|
||||
<div>
|
||||
Get your key from <a target="_blank" href="https://console.anthropic.com/account/keys">Anthropic's developer console</a>.
|
||||
|
@ -1524,9 +1524,6 @@ async function onConnectButtonClick(e) {
|
||||
}
|
||||
|
||||
function toggleChatCompletionForms() {
|
||||
$("#claude_form").toggle(oai_settings.chat_completion_source == chat_completion_sources.CLAUDE);
|
||||
$("#openai_form").toggle(oai_settings.chat_completion_source == chat_completion_sources.OPENAI);
|
||||
|
||||
if (oai_settings.chat_completion_source == chat_completion_sources.CLAUDE) {
|
||||
$('#model_claude_select').trigger('change');
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user