Skip to content

Commit 64dfe96

Browse files
committed
fix: add docstring
1 parent 1a50323 commit 64dfe96

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

autogen/remote/agent_service.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,17 @@ async def __call__(self, state: RequestMessage) -> ResponseMessage | None:
8787
def _add_message_to_local_history(
8888
self, message: str | dict[str, Any] | None, role: str
8989
) -> tuple[Literal[True], dict[str, Any]] | tuple[Literal[False], dict[str, Any] | None]:
90+
"""add a message to the local history.
91+
92+
Args:
93+
message: the message to add to the local history.
94+
role: the role of the message.
95+
96+
Returns:
97+
A tuple containing a boolean indicating whether the message is valid and the normalized oai message.
98+
If the message is not valid, the boolean is False and the oai message is None.
99+
If the message is valid, the boolean is True and the oai message is the normalized oai message.
100+
"""
90101
if message is None:
91102
return False, None # output message is empty, interrupt the loop
92103

0 commit comments

Comments
 (0)