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="windowai">Window.ai</option>
|
||||||
<option value="claude">Claude</option>
|
<option value="claude">Claude</option>
|
||||||
</select>
|
</select>
|
||||||
<form id="openai_form">
|
<form id="openai_form" data-source="openai">
|
||||||
<h4>OpenAI API key</h4>
|
<h4>OpenAI API key</h4>
|
||||||
<span>
|
<span>
|
||||||
<ol>
|
<ol>
|
||||||
@ -1375,7 +1375,7 @@
|
|||||||
<a id="openai_api_usage" href="javascript:void(0);">View API Usage Metrics</a>
|
<a id="openai_api_usage" href="javascript:void(0);">View API Usage Metrics</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<form id="claude_form">
|
<form id="claude_form" data-source="claude">
|
||||||
<h4>Claude API Key</h4>
|
<h4>Claude API Key</h4>
|
||||||
<div>
|
<div>
|
||||||
Get your key from <a target="_blank" href="https://console.anthropic.com/account/keys">Anthropic's developer console</a>.
|
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() {
|
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) {
|
if (oai_settings.chat_completion_source == chat_completion_sources.CLAUDE) {
|
||||||
$('#model_claude_select').trigger('change');
|
$('#model_claude_select').trigger('change');
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user