mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-10 21:50:14 -07:00
OpenAI: improve model sorting, and update the 3.5-Turbo symlink and 3.5 0125 model description. Fixes #380
This commit is contained in:
@@ -123,10 +123,10 @@ const _knownOpenAIChatModels: ManualMappings = [
|
||||
// NOTE: speculation from the https://openai.com/blog/new-embedding-models-and-api-updates post; hasn't been released yet
|
||||
idPrefix: 'gpt-3.5-turbo-0125',
|
||||
label: '3.5-Turbo (0125)',
|
||||
description: 'Snapshot of gpt-3.5-turbo-16k from January 25th 2023.',
|
||||
description: 'The latest GPT-3.5 Turbo model with higher accuracy at responding in requested formats and a fix for a bug which caused a text encoding issue for non-English language function calls.',
|
||||
contextWindow: 16385,
|
||||
maxCompletionTokens: 4096,
|
||||
interfaces: [LLM_IF_OAI_Chat],
|
||||
interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn],
|
||||
isLatest: true,
|
||||
},
|
||||
{
|
||||
@@ -136,6 +136,7 @@ const _knownOpenAIChatModels: ManualMappings = [
|
||||
contextWindow: 16385,
|
||||
maxCompletionTokens: 4096,
|
||||
interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn],
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
idPrefix: 'gpt-3.5-turbo-16k-0613',
|
||||
@@ -178,16 +179,16 @@ const _knownOpenAIChatModels: ManualMappings = [
|
||||
isLegacy: true,
|
||||
},
|
||||
{
|
||||
// NOTE: will be updated to gpt-3.5-turbo-0125 two weeks after it launches
|
||||
// NOTE: will link to 0125 on Feb 16th 2024 - we are pre-ready for it on the dev branch
|
||||
idPrefix: 'gpt-3.5-turbo',
|
||||
label: '🔗 3.5-Turbo → 0613', // '3.5-Turbo → 🔗 0613',
|
||||
description: 'Currently points to gpt-3.5-turbo-0613.',
|
||||
symLink: 'gpt-3.5-turbo-0613',
|
||||
label: '🔗 3.5-Turbo → 0125', // '3.5-Turbo → 🔗 0125',
|
||||
description: 'Currently points to gpt-3.5-turbo-0125.',
|
||||
symLink: 'gpt-3.5-turbo-0125',
|
||||
// copied
|
||||
contextWindow: 4097,
|
||||
contextWindow: 16385,
|
||||
maxCompletionTokens: 4096,
|
||||
interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn],
|
||||
hidden: true,
|
||||
isLegacy: true,
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -190,8 +190,18 @@ export const llmOpenAIRouter = createTRPCRouter({
|
||||
|
||||
// custom OpenAI sort
|
||||
.sort((a, b) => {
|
||||
// due to model name, sorting doesn't require special cases anymore
|
||||
return b.label.localeCompare(a.label);
|
||||
|
||||
// fix the OpenAI model names to be chronologically sorted
|
||||
function remapReleaseDate(id: string): string {
|
||||
return id
|
||||
.replace('0314', '230314')
|
||||
.replace('0613', '230613')
|
||||
.replace('1106', '231106')
|
||||
.replace('0125', '240125');
|
||||
}
|
||||
|
||||
// due to using by-label, sorting doesn't require special cases anymore
|
||||
return remapReleaseDate(b.label).localeCompare(remapReleaseDate(a.label));
|
||||
|
||||
// move models with the link emoji (🔗) to the bottom
|
||||
// const aLink = a.label.includes('🔗');
|
||||
|
||||
Reference in New Issue
Block a user