Skip to content

Commit

Permalink
Update arguments type
Browse files Browse the repository at this point in the history
  • Loading branch information
TaoChenOSU committed Dec 16, 2024
1 parent 7ec61a4 commit 00efe1d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import json
import logging
from collections.abc import Callable
from collections.abc import Callable, Mapping
from typing import Any

from semantic_kernel.contents.chat_message_content import ChatMessageContent
Expand Down Expand Up @@ -50,7 +50,7 @@ def _format_assistant_message(message: ChatMessageContent) -> dict[str, Any]:
"type": "tool_use",
"id": item.id or "",
"name": item.name or "",
"input": item.arguments if isinstance(item.arguments, dict) else json.loads(item.arguments),
"input": item.arguments if isinstance(item.arguments, Mapping) else json.loads(item.arguments),
})
else:
logger.warning(
Expand Down

0 comments on commit 00efe1d

Please sign in to comment.