Simulate the agent configuration
(self, session_id: str, goal: str, description: str, world_info: str, functions: list, custom_functions: list)
| 26 | return functions |
| 27 | |
| 28 | def simulate(self, session_id: str, goal: str, description: str, world_info: str, functions: list, custom_functions: list): |
| 29 | """ |
| 30 | Simulate the agent configuration |
| 31 | """ |
| 32 | response = requests.post( |
| 33 | f"{self.api_url}/simulate", |
| 34 | json={ |
| 35 | "data": { |
| 36 | "sessionId": session_id, |
| 37 | "goal": goal, |
| 38 | "description": description, |
| 39 | "worldInfo": world_info, |
| 40 | "functions": functions, |
| 41 | "customFunctions": [x.toJson() for x in custom_functions] |
| 42 | } |
| 43 | }, |
| 44 | headers={"x-api-key": self.api_key} |
| 45 | ) |
| 46 | |
| 47 | if (response.status_code != 200): |
| 48 | raise Exception(response.json()) |
| 49 | |
| 50 | return response.json()["data"] |
| 51 | |
| 52 | def react(self, session_id: str, platform: str, goal: str, |
| 53 | description: str, world_info: str, functions: list, custom_functions: list, |
no test coverage detected