This commit is contained in:
pablodanswer 2024-10-24 19:47:35 -07:00
parent 57e6027ab2
commit 9c918a1d05
4 changed files with 7 additions and 58 deletions

View File

@ -1,55 +0,0 @@
"""update_claude_model
Revision ID: 027019a11a0a
Revises: 1b10e1fda030
Create Date: 2024-10-22 15:24:17.405747
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "027019a11a0a"
down_revision = "1b10e1fda030"
branch_labels = None
depends_on = None
def upgrade() -> None:
connection = op.get_bind()
connection.execute(
sa.text(
"UPDATE llm_provider SET display_model_names = "
"array_replace(display_model_names, 'claude-3-5-sonnet-20240620', "
"'claude-3-5-sonnet-20241022') WHERE 'claude-3-5-sonnet-20240620' = "
"ANY(display_model_names)"
)
)
connection.execute(
sa.text(
"UPDATE llm_provider SET display_model_names = "
"array_replace(display_model_names, 'anthropic.claude-3-5-sonnet-20240620-v1:0', "
"'anthropic.claude-3-5-sonnet-20241022-v2:0') WHERE 'anthropic.claude-3-5-sonnet-20240620-v1:0' = "
"ANY(display_model_names)"
)
)
def downgrade() -> None:
connection = op.get_bind()
connection.execute(
sa.text(
"UPDATE llm_provider SET display_model_names = "
"array_replace(display_model_names, 'claude-3-5-sonnet-20241022', "
"'claude-3-5-sonnet-20240620') WHERE 'claude-3-5-sonnet-20241022' = "
"ANY(display_model_names)"
)
)
connection.execute(
sa.text(
"UPDATE llm_provider SET display_model_names = "
"array_replace(display_model_names, 'anthropic.claude-3-5-sonnet-20241022-v2:0', "
"'anthropic.claude-3-5-sonnet-20240620-v1:0') WHERE 'anthropic.claude-3-5-sonnet-20241022-v2:0' = "
"ANY(display_model_names)"
)
)

View File

@ -61,7 +61,6 @@ BEDROCK_MODEL_NAMES = [
IGNORABLE_ANTHROPIC_MODELS = [
"claude-2",
"claude-instant-1",
"claude-3-5-sonnet-20240620",
]
ANTHROPIC_PROVIDER_NAME = "anthropic"
ANTHROPIC_MODEL_NAMES = [

View File

@ -277,7 +277,8 @@ const MODEL_DISPLAY_NAMES: { [key: string]: string } = {
"claude-2.1": "Claude 2.1",
"claude-2.0": "Claude 2.0",
"claude-instant-1.2": "Claude Instant 1.2",
"claude-3-5-sonnet-20241022": "Claude 3.5 Sonnet",
"claude-3-5-sonnet-20240620": "Claude 3.5 Sonnet",
"claude-3-5-sonnet-20241022": "Claude 3.5 Sonnet (New)",
// Bedrock models
"meta.llama3-1-70b-instruct-v1:0": "Llama 3.1 70B",
@ -300,7 +301,8 @@ const MODEL_DISPLAY_NAMES: { [key: string]: string } = {
"anthropic.claude-v1": "Claude v1",
"anthropic.claude-3-opus-20240229-v1:0": "Claude 3 Opus",
"anthropic.claude-3-haiku-20240307-v1:0": "Claude 3 Haiku",
"anthropic.claude-3-5-sonnet-20241022-v2:0": "Claude 3.5 Sonnet",
"anthropic.claude-3-5-sonnet-20240620-v1:0": "Claude 3.5 Sonnet",
"anthropic.claude-3-5-sonnet-20241022-v2:0": "Claude 3.5 Sonnet (New)",
"anthropic.claude-3-sonnet-20240229-v1:0": "Claude 3 Sonnet",
"mistral.mistral-large-2402-v1:0": "Mistral Large",
"mistral.mixtral-8x7b-instruct-v0:1": "Mixtral 8x7B Instruct",

View File

@ -69,6 +69,7 @@ const MODEL_NAMES_SUPPORTING_IMAGE_INPUT = [
"gpt-4-turbo",
"gpt-4-1106-vision-preview",
// standard claude names
"claude-3-5-sonnet-20240620",
"claude-3-5-sonnet-20241022",
"claude-3-opus-20240229",
"claude-3-sonnet-20240229",
@ -77,11 +78,13 @@ const MODEL_NAMES_SUPPORTING_IMAGE_INPUT = [
"claude-3-opus-20240229-v1:0",
"claude-3-sonnet-20240229-v1:0",
"claude-3-haiku-20240307-v1:0",
"claude-3-5-sonnet-20240620-v1:0",
"claude-3-5-sonnet-20241022-v2:0",
// claude names with full AWS Bedrock names
"anthropic.claude-3-opus-20240229-v1:0",
"anthropic.claude-3-sonnet-20240229-v1:0",
"anthropic.claude-3-haiku-20240307-v1:0",
"anthropic.claude-3-5-sonnet-20240620-v1:0",
"anthropic.claude-3-5-sonnet-20241022-v2:0",
];