diff --git a/examples/hosted_agent/example-twitter.py b/examples/hosted_agent/example-twitter.py index dbb832c7..e8d791d7 100644 --- a/examples/hosted_agent/example-twitter.py +++ b/examples/hosted_agent/example-twitter.py @@ -5,7 +5,6 @@ api_key=os.environ.get("VIRTUALS_API_KEY"), goal="search for best songs", description="Test Description", - world_info="Test World Info", task_description="reply to tweet that worth your attention, if not ignore" ) @@ -49,9 +48,6 @@ Character goal: {{twitterGoal}} -These are the world info that might be useful as additional context for your response. You do not need to use any of the information describe in this section if you don't need it. -{{worldInfo}} - {{retrieveKnowledge}} This your post history, you should evaluate if it is repetitive or aligned with your goal. Post history is sorted by oldest to newest. Be creative. diff --git a/src/game_sdk/hosted_game/README.md b/src/game_sdk/hosted_game/README.md index 07dc2d92..f3d045de 100644 --- a/src/game_sdk/hosted_game/README.md +++ b/src/game_sdk/hosted_game/README.md @@ -40,7 +40,6 @@ agent = Agent( api_key=VIRTUALS_API_KEY, goal="Autonomously analyze crypto markets and provide trading insights", description="HODL-9000: A meme-loving trading bot powered by hopium and ramen", - world_info="Virtual crypto trading environment where 1 DOGE = 1 DOGE", task_description="Process incoming tweet. Ignore if it is boring or unimportant. Total replies made: {{replyCount}}. Ignore if the conversation has gone too long." ) ``` @@ -50,22 +49,19 @@ You can also initialize the agent first with just the API key and set the goals, ```python agent = Agent(api_key=VIRTUALS_API_KEY) -# check what is current goal, descriptions, world_info and task_description +# check what is current goal, descriptions and task_description agent.get_goal() agent.get_description() -agent.get_world_info() agent.get_task_description() # Set components individually - set change the agent goal/description/worldinfo/task_description agent.set_goal("Autonomously analyze crypto markets and provide trading insights") agent.set_description("HODL-9000: A meme-loving trading bot powered by hopium and ramen") -agent.set_world_info("Virtual crypto trading environment where 1 DOGE = 1 DOGE") agent.set_task_description("Process incoming tweet. Ignore if it is boring or unimportant. Total replies made: {{replyCount}}. Ignore if the conversation has gone too long.") -# check what is current goal, descriptions, world_info and task_description +# check what is current goal, descriptions and task_description agent.get_goal() agent.get_description() -agent.get_world_info() agent.get_task_description() # set game engine model diff --git a/src/game_sdk/hosted_game/agent.py b/src/game_sdk/hosted_game/agent.py index 75eac08e..ab8695a5 100644 --- a/src/game_sdk/hosted_game/agent.py +++ b/src/game_sdk/hosted_game/agent.py @@ -251,7 +251,6 @@ def __init__( api_key: str, goal: str = "", description: str = "", - world_info: str = "", main_heartbeat: int = 15, reaction_heartbeat: int = 5, task_description: str = "", @@ -260,7 +259,6 @@ def __init__( self.game_sdk = sdk.GameSDK(api_key) self.goal = goal self.description = description - self.world_info = world_info self.enabled_functions: List[str] = [] self.custom_functions: List[Function] = [] self.main_heartbeat = main_heartbeat @@ -278,10 +276,6 @@ def set_description(self, description: str): self.description = description return True - def set_world_info(self, world_info: str): - self.world_info = world_info - return True - def set_main_heartbeat(self, main_heartbeat: int): self.main_heartbeat = main_heartbeat return True @@ -311,9 +305,6 @@ def get_goal(self) -> str: def get_description(self) -> str: return self.description - def get_world_info(self) -> str: - return self.world_info - def list_available_default_twitter_functions(self) -> Dict[str, str]: """ List all of the default functions (currently default functions are only available for Twitter/X platform) @@ -347,7 +338,6 @@ def simulate_twitter(self, session_id: str): session_id, self.goal, self.description, - self.world_info, self.enabled_functions, self.custom_functions ) @@ -366,7 +356,6 @@ def react(self, session_id: str, platform: str, tweet_id: str = None, event: str tweet_id=tweet_id, goal=self.goal, description=self.description, - world_info=self.world_info, functions=self.enabled_functions, custom_functions=self.custom_functions ) @@ -378,7 +367,6 @@ def deploy_twitter(self): return self.game_sdk.deploy( self.goal, self.description, - self.world_info, self.enabled_functions, self.custom_functions, self.main_heartbeat, @@ -393,7 +381,6 @@ def export(self) -> str: export_dict = { "goal": self.goal, "description": self.description, - "worldInfo": self.world_info, "functions": self.enabled_functions, "customFunctions": [ { diff --git a/src/game_sdk/hosted_game/sdk.py b/src/game_sdk/hosted_game/sdk.py index 38961008..fd1fd63d 100644 --- a/src/game_sdk/hosted_game/sdk.py +++ b/src/game_sdk/hosted_game/sdk.py @@ -25,7 +25,7 @@ def functions(self): return functions - def simulate(self, session_id: str, goal: str, description: str, world_info: str, functions: list, custom_functions: list): + def simulate(self, session_id: str, goal: str, description: str, functions: list, custom_functions: list): """ Simulate the agent configuration """ @@ -36,7 +36,6 @@ def simulate(self, session_id: str, goal: str, description: str, world_info: st "sessionId": session_id, "goal": goal, "description": description, - "worldInfo": world_info, "functions": functions, "customFunctions": [x.toJson() for x in custom_functions] } @@ -50,7 +49,7 @@ def simulate(self, session_id: str, goal: str, description: str, world_info: st return response.json()["data"] def react(self, session_id: str, platform: str, goal: str, - description: str, world_info: str, functions: list, custom_functions: list, + description: str, functions: list, custom_functions: list, event: str = None, task: str = None, tweet_id: str = None): """ Simulate the agent configuration @@ -61,7 +60,6 @@ def react(self, session_id: str, platform: str, goal: str, "sessionId": session_id, "goal": goal, "description": description, - "worldInfo": world_info, "functions": functions, "customFunctions": [x.toJson() for x in custom_functions] } @@ -90,14 +88,13 @@ def react(self, session_id: str, platform: str, goal: str, return response.json()["data"] - def deploy(self, goal: str, description: str, world_info: str, functions: list, custom_functions: list, main_heartbeat: int, reaction_heartbeat: int, tweet_usernames: list = None, templates: list = None, game_engine_model: str = "llama_3_1_405b"): + def deploy(self, goal: str, description: str, functions: list, custom_functions: list, main_heartbeat: int, reaction_heartbeat: int, tweet_usernames: list = None, templates: list = None, game_engine_model: str = "llama_3_1_405b"): """ Simulate the agent configuration """ payload = { "goal": goal, "description": description, - "worldInfo": world_info, "functions": functions, "customFunctions": [x.toJson() for x in custom_functions], "gameState": {