MCPcopy Create free account
hub / github.com/Virtual-Protocol/virtuals-python / functions

Method functions

src/virtuals_sdk/twitter_agent/sdk.py:11–26  ·  view source on GitHub ↗

Get all default functions

(self)

Source from the content-addressed store, hash-verified

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 """

Calls

no outgoing calls

Tested by

no test coverage detected