Skip to content

Commit

Permalink
backend: add new Cohere Platform models to seeder (#790)
Browse files Browse the repository at this point in the history
add models
  • Loading branch information
tianjing-li authored Oct 1, 2024
1 parent 8ce9762 commit 5ffff04
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
24 changes: 24 additions & 0 deletions src/backend/database_models/seeders/deplyments_models_seed.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@
"cohere_name": "c4ai-aya-23",
"is_default": False,
},
"c4ai-aya-23-35b": {
"cohere_name": "c4ai-aya-23-35b",
"is_default": False,
},
"command-r-08-2024": {
"cohere_name": "command-r-08-2024",
"is_default": False,
},
"command-r-plus-08-2024": {
"cohere_name": "command-r-plus-08-2024",
"is_default": False,
},
},
ModelDeploymentName.SingleContainer: {
"command": {
Expand Down Expand Up @@ -77,6 +89,18 @@
"cohere_name": "c4ai-aya-23",
"is_default": False,
},
"c4ai-aya-23-35b": {
"cohere_name": "c4ai-aya-23-35b",
"is_default": False,
},
"command-r-08-2024": {
"cohere_name": "command-r-08-2024",
"is_default": False,
},
"command-r-plus-08-2024": {
"cohere_name": "command-r-plus-08-2024",
"is_default": False,
},
},
ModelDeploymentName.SageMaker: {
"sagemaker-command": {
Expand Down
6 changes: 1 addition & 5 deletions src/backend/model_deployments/cohere_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ def list_models(cls) -> List[str]:
return []

models = response.json()["models"]
return [
model["name"]
for model in models
if model.get("endpoints") and "chat" in model["endpoints"]
]
return [model["name"] for model in models if model.get("endpoints") and "chat" in model["endpoints"]]

@classmethod
def is_available(cls) -> bool:
Expand Down

0 comments on commit 5ffff04

Please sign in to comment.