forked from LAION-AI/Open-Assistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.py
36 lines (24 loc) · 887 Bytes
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import pydantic
class Settings(pydantic.BaseSettings):
backend_url: str = "ws://localhost:8000"
model_config_name: str = "distilgpt2"
inference_server_url: str = "http://localhost:8001"
inference_server_route: str = "/generate_stream"
safety_server_url: str = "http://localhost:8002"
api_key: str = "0000"
oa_protocol_version: str = "v2"
# Supported: oasst, chatml
model_prompt_format: str = "oasst"
retry_on_error: bool = True
hf_pause: float = 0.075
max_parallel_requests: int = 1
use_stop_sequences: bool = False
perform_oom_test: bool = False
oom_test_max_length: int | None = None
# for hf basic server
quantize: bool = False
bearer_token: str | None = None
basic_auth_username: str | None = None
basic_auth_password: str | None = None
enable_safety: bool = False
settings = Settings()