--- a +++ b/ehragent/config.py @@ -0,0 +1,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 \ No newline at end of file