Skip to content

Commit

Permalink
Fix typing in base agent
Browse files Browse the repository at this point in the history
  • Loading branch information
KennyVaneetvelde committed Nov 16, 2024
1 parent b3fa5bf commit 6b4a954
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions atomic-agents/atomic_agents/agents/base_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,15 @@ def get_response(self, response_model=None) -> Type[BaseModel]:

return response

def run(self, user_input: Optional[Type[BaseIOSchema]] = None) -> Type[BaseIOSchema]:
def run(self, user_input: Optional[BaseIOSchema] = None) -> BaseIOSchema:
"""
Runs the chat agent with the given user input synchronously.
Args:
user_input (Optional[Type[BaseIOSchema]]): The input from the user. If not provided, skips adding to memory.
user_input (Optional[BaseIOSchema]): The input from the user. If not provided, skips adding to memory.
Returns:
Type[BaseIOSchema]: The response from the chat agent.
BaseIOSchema: The response from the chat agent.
"""
if user_input:
self.memory.initialize_turn()
Expand All @@ -174,12 +174,12 @@ def run(self, user_input: Optional[Type[BaseIOSchema]] = None) -> Type[BaseIOSch

return response

async def run_async(self, user_input: Optional[Type[BaseIOSchema]] = None):
async def run_async(self, user_input: Optional[BaseIOSchema] = None):
"""
Runs the chat agent with the given user input, supporting streaming output asynchronously.
Args:
user_input (Optional[Type[BaseIOSchema]]): The input from the user. If not provided, skips adding to memory.
user_input (Optional[BaseIOSchema]): The input from the user. If not provided, skips adding to memory.
Yields:
BaseModel: Partial responses from the chat agent.
Expand Down

0 comments on commit 6b4a954

Please sign in to comment.