Skip to content

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

@johngiles12345

Description

@johngiles12345

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"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions