Get all default functions
(self)
| 9 | self.api_key = api_key |
| 10 | |
| 11 | def functions(self): |
| 12 | """ |
| 13 | Get all default functions |
| 14 | """ |
| 15 | response = requests.get( |
| 16 | f"{self.api_url}/functions", headers={"x-api-key": self.api_key}) |
| 17 | |
| 18 | if (response.status_code != 200): |
| 19 | raise Exception(response.json()) |
| 20 | |
| 21 | functions = {} |
| 22 | |
| 23 | for x in response.json()["data"]: |
| 24 | functions[x["fn_name"]] = x["fn_description"] |
| 25 | |
| 26 | return functions |
| 27 | |
| 28 | def simulate(self, session_id: str, goal: str, description: str, world_info: str, functions: list, custom_functions: list): |
| 29 | """ |
no outgoing calls
no test coverage detected