07-agent-as-tool - agent-as-tools.ipynb - Sequential Agent Communication Pattern throws error

オープン
#40 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
jupyter-notebook, python
領域
ai

調査の方向性

Open 07-agent-as-tool/agent-as-tools.ipynb and inspect the research_assistant_2 example and the response handling described in the issue. Reproduce the error by calling research_assistant_2 with a query such as the Titanic example. Done when the call no longer raises the reported attribute error and the sequential agent communication example works.

索引モデルが issue の本文から書いたものです。

説明

bug

07-agent-as-tool - agent-as-tools.ipynb - Sequential Agent Communication Pattern throws error.
There is no example offered to test the research_assistant_2 function. The next section shows an unrelated 'use_llm tool' example that loops endlessly. Not sure why that is there.

I created a cell to test research_assistant_2 tool:
query = "Can you do a research on the Titanic?"
research_assistant_2(query)

This throws an error: "Error in research assistant: 'dict' object has no attribute 'content'"

The suggested fix is to modify research_assistant_2 tool:

research_text = research_response.message.content[0]["text"]
Change to: research_text = research_response.message['content'][0]["text"]

summary_text = summary_response.message.content[0]["text"]
Change to: summary_text = summary_response.message['content'][0]["text"]

主要言語
Python
スター
897
フォーク
450
平均マージ
1日 9時間
マージ済み PR(30日)
9

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

strands-agents/samples のほかの issue

strands-agents/samples の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。