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:
valadaptive
2023-12-11 23:33:52 -05:00
parent 796659f68c
commit 92bd766bcb
2 changed files with 6 additions and 6 deletions

View File

@ -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),