mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-14 17:03:29 +03:00
2e75de4039
# Description closes #2722. - Creates `quivr-monorepo` - Separates `quivr-core` - Update dockerfiles and docker-compose --------- Co-authored-by: aminediro <aminediro@github.com>
24 lines
646 B
Python
24 lines
646 B
Python
from pydantic import BaseModel, field_validator
|
|
|
|
|
|
class RAGConfig(BaseModel):
|
|
model: str = "gpt-3.5-turbo-0125" # pyright: ignore reportPrivateUsage=none
|
|
temperature: float | None = 0.1
|
|
max_tokens: int | None = 2000
|
|
max_input: int = 2000
|
|
streaming: bool = False
|
|
max_files: int = 20
|
|
prompt: str | None = None
|
|
|
|
@field_validator("temperature", mode="before")
|
|
def set_default_temperature(cls, v):
|
|
if v is None:
|
|
return 0.1
|
|
return v
|
|
|
|
@field_validator("max_tokens", mode="before")
|
|
def set_default_max_tokens(cls, v):
|
|
if v is None:
|
|
return 2000
|
|
return v
|