Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBer78 committed Sep 17, 2024
1 parent b1b2856 commit b3d93f8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/neuroagent/agents/base_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ async def arun(self, *args: Any, **kwargs: Any) -> AgentOutput:
"""Arun method of the service."""

@abstractmethod
async def astream(self, *args: Any, **kwargs: Any) -> AsyncIterator[str]:
def astream(self, *args: Any, **kwargs: Any) -> AsyncIterator[str]:
"""Astream method of the service."""

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion src/neuroagent/agents/simple_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async def arun(self, query: str) -> Any:
result = await self.agent.ainvoke({"messages": [("human", query)]})
return self._process_output(result)

async def astream(self, query: str) -> AsyncIterator[str]: # type: ignore
async def astream(self, query: str) -> AsyncIterator[str]:
"""Run the agent against a query in streaming way.
Parameters
Expand Down
6 changes: 3 additions & 3 deletions src/neuroagent/agents/simple_chat_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async def arun(self, thread_id: str, query: str) -> Any:

async def astream(
self, thread_id: str, query: str, connection_string: str | None = None
) -> AsyncIterator[str]: # type: ignore
) -> AsyncIterator[str]:
"""Run the agent against a query in streaming way.
Parameters
Expand All @@ -58,8 +58,8 @@ async def astream(
connection_string
connection string for the checkpoint database.
Returns
-------
Yields
------
Iterator streaming the processed output of the LLM
"""
async with (
Expand Down
2 changes: 1 addition & 1 deletion src/neuroagent/app/routers/qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ async def run_streamed_chat_agent(
thread_id=thread_id,
connection_string=connection_string,
)
) # type: ignore
)

0 comments on commit b3d93f8

Please sign in to comment.