mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Rename chat completions endpoints
OpenAI calls this the "Chat Completions API", in contrast to their previous "Text Completions API", so that's what I'm naming it; both because other services besides OpenAI implement it, and to avoid confusion with the existing /api/openai route used for OpenAI extras.
This commit is contained in:
@ -1556,7 +1556,7 @@ async function sendOpenAIRequest(type, messages, signal) {
|
||||
generate_data['seed'] = oai_settings.seed;
|
||||
}
|
||||
|
||||
const generate_url = '/generate_openai';
|
||||
const generate_url = '/api/backends/chat-completions/generate';
|
||||
const response = await fetch(generate_url, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(generate_data),
|
||||
@ -1646,7 +1646,7 @@ async function calculateLogitBias() {
|
||||
let result = {};
|
||||
|
||||
try {
|
||||
const reply = await fetch(`/openai_bias?model=${getTokenizerModel()}`, {
|
||||
const reply = await fetch(`/api/backends/chat-completions/bias?model=${getTokenizerModel()}`, {
|
||||
method: 'POST',
|
||||
headers: getRequestHeaders(),
|
||||
body,
|
||||
@ -2439,7 +2439,7 @@ async function getStatusOpen() {
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await fetch('/getstatus_openai', {
|
||||
const response = await fetch('/api/backends/chat-completions/status', {
|
||||
method: 'POST',
|
||||
headers: getRequestHeaders(),
|
||||
body: JSON.stringify(data),
|
||||
|
Reference in New Issue
Block a user