mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-31 11:35:37 +01:00
Code clean-up
This commit is contained in:
parent
438c78574f
commit
e77cded357
@ -1080,8 +1080,8 @@ async function sendOpenAIRequest(type, openai_msgs_tosend, signal) {
|
||||
const isScale = oai_settings.chat_completion_source == chat_completion_sources.SCALE;
|
||||
const isAI21 = oai_settings.chat_completion_source == chat_completion_sources.AI21;
|
||||
const isTextCompletion = oai_settings.chat_completion_source == chat_completion_sources.OPENAI && (oai_settings.openai_model.startsWith('text-') || oai_settings.openai_model.startsWith('code-'));
|
||||
const stream = type !== 'quiet' && oai_settings.stream_openai && !isScale && !isAI21;
|
||||
const isQuiet = type === 'quiet';
|
||||
const stream = oai_settings.stream_openai && !isQuiet && !isScale && !isAI21;
|
||||
|
||||
if (isAI21) {
|
||||
const joinedMsgs = openai_msgs_tosend.reduce((acc, obj) => {
|
||||
@ -2836,8 +2836,8 @@ async function onConnectButtonClick(e) {
|
||||
await writeSecret(SECRET_KEYS.AI21, api_key_ai21);
|
||||
}
|
||||
|
||||
if (!secret_state[SECRET_KEYS.AI21] && !oai_settings.reverse_proxy) {
|
||||
console.log('No secret key saved for Claude');
|
||||
if (!secret_state[SECRET_KEYS.AI21]) {
|
||||
console.log('No secret key saved for AI21');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user