Skip to content

Commit f53a8be

Browse files
committed
Fix _prepare_for_add return type annotation
1 parent 6de0106 commit f53a8be

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎python/semantic_kernel/contents/chat_history.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,11 @@ def add_message(
215215

216216
def _prepare_for_add(
217217
self, role: AuthorRole, content: str | None = None, items: list[KernelContent] | None = None, **kwargs: Any
218-
) -> dict[str, str]:
218+
) -> dict[str, Any]:
219219
"""Prepare a message to be added to the history."""
220220
kwargs["role"] = role
221221

222-
if role == AuthorRole.TOOL and content is not None and not items:
222+
if role == AuthorRole.TOOL and content and not items:
223223
tool_call_id = kwargs.pop("tool_call_id", None)
224224
function_name = kwargs.pop("function_name", "unknown")
225225
function_result_content = FunctionResultContent(

0 commit comments

Comments
 (0)