You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api/schemas/admin/routers.py
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ class CreateRouter(BaseModel):
17
17
type: ModelType=Field(..., description="Type of the model router. It will be used to identify the model router type.", examples=["text-generation"]) # fmt: off
18
18
aliases: list[constr(strip_whitespace=True, min_length=1, max_length=64)] =Field(default_factory=list, description="Aliases of the model. It will be used to identify the model by users.", examples=[["model-alias", "model-alias-2"]]) # fmt: off
19
19
load_balancing_strategy: RouterLoadBalancingStrategy=Field(default=RouterLoadBalancingStrategy.SHUFFLE, description="Routing strategy for load balancing between providers of the model. It will be used to identify the model type.", examples=["least_busy"]) # fmt: off
20
+
is_default: bool=Field(default=False, description="Whether the router is the default one for its type.")
20
21
cost_prompt_tokens: float=Field(default=0.0, ge=0.0, description="Cost of a million prompt tokens (decrease user budget)")
21
22
cost_completion_tokens: float=Field(default=0.0, ge=0.0, description="Cost of a million completion tokens (decrease user budget)")
22
23
@@ -30,6 +31,7 @@ class UpdateRouter(BaseModel):
30
31
type: ModelType|None=Field(default=None, description="Type of the model router. It will be used to identify the model router type.", examples=["text-generation"]) # fmt: off
31
32
aliases: list[constr(strip_whitespace=True, min_length=1, max_length=64)] |None=Field(default=None, description="Aliases of the model. It will be used to identify the model by users.", examples=[["model-alias", "model-alias-2"]]) # fmt: off
32
33
load_balancing_strategy: RouterLoadBalancingStrategy|None=Field(default=None, description="Routing strategy for load balancing between providers of the model. It will be used to identify the model type.", examples=["least_busy"]) # fmt: off
34
+
is_default: bool|None=Field(default=None, description="Whether the router is the default one for its type.")
33
35
cost_prompt_tokens: float|None=Field(default=None, ge=0.0, description="Cost of a million prompt tokens (decrease user budget)")
34
36
cost_completion_tokens: float|None=Field(default=None, ge=0.0, description="Cost of a million completion tokens (decrease user budget)")
35
37
@@ -42,6 +44,7 @@ class Router(BaseModel):
42
44
type: ModelType=Field(..., description="Type of the model router. It will be used to identify the model router type.", examples=["text-generation"]) # fmt: off
43
45
aliases: list[str] |None=Field(default=None, description="Aliases of the model. It will be used to identify the model by users.", examples=[["model-alias", "model-alias-2"]]) # fmt: off
44
46
load_balancing_strategy: RouterLoadBalancingStrategy=Field(..., description="Routing strategy for load balancing between providers of the model. It will be used to identify the model type.", examples=["least_busy"]) # fmt: off
47
+
is_default: bool=Field(..., description="Whether the router is the default one for its type.")
45
48
vector_size: int|None=Field(default=None, description="Dimension of the vectors, if the models are embeddings. Make sure it is the same for all models.") # fmt: off
46
49
max_context_length: int|None=Field(default=None, description="Maximum amount of tokens a context could contains. Make sure it is the same for all models.") # fmt: off
47
50
cost_prompt_tokens: float=Field(description="Cost of a million prompt tokens (decrease user budget)")
Copy file name to clipboardExpand all lines: api/schemas/core/configuration.py
-8Lines changed: 0 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -361,9 +361,6 @@ class Settings(ConfigBaseModel):
361
361
monitoring_postgres_enabled: bool=Field(default=True, description="If true, the log usage will be written in the PostgreSQL database.") # fmt: off
362
362
monitoring_prometheus_enabled: bool=Field(default=True, description="If true, Prometheus metrics will be exposed in the `/metrics` endpoint.") # fmt: off
363
363
364
-
# vector store
365
-
vector_store_model: str|None=Field(default=None, description="Model used to vectorize the text in the vector store database. Is required if a vector store dependency is provided (Elasticsearch or Qdrant). This model must be defined in the `models` section and have type `text-embeddings-inference`.") # fmt: off
366
-
367
364
# postgres_session
368
365
session_secret_key: str|None=Field(default=None, description='Secret key for postgres_session middleware. If not provided, the master key will be used.', examples=["knBnU1foGtBEwnOGTOmszldbSwSYLTcE6bdibC8bPGM"]) # fmt: off
assertself.settings.vector_store_modelinmodels["all"], "Vector store model must be defined in models section."
426
-
assertself.settings.vector_store_modelinmodels[ModelType.TEXT_EMBEDDINGS_INFERENCE.value], f"The vector store model must have type {ModelType.TEXT_EMBEDDINGS_INFERENCE}."# fmt: off
0 commit comments