Python: Added ChatClientAgentThread and ChatClientAgent implementations (#150)

* Added ChatClientAgentThread

* Initial version of ChatClientAgent

* Completed ChatClientAgent

* Small fixes and unit tests

* Fixes based on pre-commit

* Small fixes

* Small renaming

* Small improvement

* Small fixes

* Addressed PR feedback

* Small fix

* Added method for AgentRunResponse from streaming conversion

* Addressed PR feedback

* Addressed PR feedback

* Addressed PR feedback

* Small fix

* More fixes
This commit is contained in:
Dmytro Struk
2025-07-11 11:09:09 -07:00
committed by GitHub
Unverified
parent df84675c0f
commit 94e00bd49a
6 changed files with 530 additions and 91 deletions
@@ -256,7 +256,7 @@ class ChatClient(Protocol):
async def get_response(
self,
messages: str | ChatMessage | Sequence[ChatMessage],
messages: str | ChatMessage | list[ChatMessage],
**kwargs: Any,
) -> ChatResponse:
"""Sends input and returns the response.
@@ -274,9 +274,9 @@ class ChatClient(Protocol):
"""
...
async def get_streaming_response(
def get_streaming_response(
self,
messages: str | ChatMessage | Sequence[ChatMessage],
messages: str | ChatMessage | list[ChatMessage],
**kwargs: Any,
) -> AsyncIterable[ChatResponseUpdate]:
"""Sends input messages and streams the response.