File size: 986 Bytes
b10c78f
 
91e3db3
 
 
 
 
 
b10c78f
 
 
 
 
91e3db3
 
 
 
 
b10c78f
 
 
bcbe6a9
1b5bff3
b10c78f
5ddd617
 
 
115910a
2af9461
 
 
91e3db3
 
 
 
 
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
# config.py
from confz import BaseConfig
from pydantic import BaseModel
from typing import Optional, Dict, List

class RoleMessage(BaseModel):
    role: str
    message: str

class LLMConfig(BaseModel):
    type: str

    class Config:
        extra = 'allow'

class PromptGroup(BaseModel):
    class Config:
        extra = 'allow'

class MetaPromptConfig(BaseConfig):
    llms: Optional[dict[str, LLMConfig]]
    default_llm_temperature: Optional[float] = 0.1
    aggressive_exploration: Optional[bool] = False
    examples_path: Optional[str]
    server_name: Optional[str] = None
    server_port: Optional[int] = None
    recursion_limit: Optional[int] = 25
    recursion_limit_max: Optional[int] = 50
    allow_flagging: Optional[bool] = False
    verbose: Optional[bool] = False
    max_output_age: Optional[int] = 3
    max_output_age_max: Optional[int] = 8
    prompt_templates: Optional[Dict[str, Dict[str, List[RoleMessage]]]] = None

    class Config:
        extra = 'allow'