Skip to content

Commit

Permalink
[Documentation] Update tools.ipynb: use system messages in the tool_a…
Browse files Browse the repository at this point in the history
…gent_caller_loop session (#5068)

* Update tools.ipynb: concat system messages in the tool_agent_caller_loop session

* Fix type mismatch on list concatenation

---------

Co-authored-by: Eric Zhu <[email protected]>
  • Loading branch information
zysoong and ekzhu authored Jan 17, 2025
1 parent 8bd65c6 commit 1f22a7b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
" @message_handler\n",
" async def handle_user_message(self, message: Message, ctx: MessageContext) -> Message:\n",
" # Create a session of messages.\n",
" session: List[LLMMessage] = [UserMessage(content=message.content, source=\"user\")]\n",
" session: List[LLMMessage] = self._system_messages + [UserMessage(content=message.content, source=\"user\")]\n",
" # Run the caller loop to handle tool calls.\n",
" messages = await tool_agent_caller_loop(\n",
" self,\n",
Expand Down

0 comments on commit 1f22a7b

Please sign in to comment.