[6cf5c7]: / ehragent / config.py

Download this file

43 lines (42 with data), 1.4 kB

 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
37
38
39
40
41
42
43
def openai_config(model):
if model == '<YOUR_OWN_GPT_MODEL_I>':
config = {
"model": "<MODEL_NAME>",
"api_key": "<API_KEY>",
"base_url": "<BASE_URL>",
"api_version": "<API_VERSION>",
"api_type": "AZURE"
}
elif model == '<YOUR_OWN_GPT_MODEL_II>':
config = {
"model": "<MODEL_NAME>",
"api_key": "<API_KEY>",
"base_url": "<BASE_URL>",
"api_version": "<API_VERSION>",
"api_type": "AZURE"
}
return config
def llm_config_list(seed, config_list):
llm_config_list = {
"functions": [
{
"name": "python",
"description": "run the entire code and return the execution result. Only generate the code.",
"parameters": {
"type": "object",
"properties": {
"cell": {
"type": "string",
"description": "Valid Python code to execute.",
}
},
"required": ["cell"],
},
},
],
"config_list": config_list,
"timeout": 120,
"cache_seed": seed,
"temperature": 0,
}
return llm_config_list