Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] TypeError: unhashable type: 'dict' in Delegate Tool #1787

Open
antoinedelplace opened this issue Dec 19, 2024 · 1 comment
Open

[BUG] TypeError: unhashable type: 'dict' in Delegate Tool #1787

antoinedelplace opened this issue Dec 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@antoinedelplace
Copy link

Description

TypeError: unhashable type: 'dict'

Traceback:

in crewai\task.py(320)increment_delegations()

self.processed_by_agents.add(agent_name)

in crewai\tools\tool_usage.py(159)_use()

self.task.increment_delegations(coworker)

coworker here is not a string. It is a dict like that: {'description': 'Chief Technology Officer (CTO)', 'type': 'str'}. I don't know why.
Can you help ?

Steps to Reproduce

Create 2 agents, one should be able to delegate to the other.
Create 1 task.

Expected behavior

No error

Screenshots/Code snippets

.

Operating System

Windows 11

Python Version

3.12

crewAI Version

0.86.0

crewAI Tools Version

0.17.0

Virtual Environment

Venv

Evidence

I encountered an error while trying to use the tool. This was the error: unhashable type: 'dict'.
 Tool Delegate work to coworker accepts these inputs: Tool Name: Delegate work to coworker
Tool Arguments: {'task': {'description': 'The task to delegate', 'type': 'str'}, 'context': {'description': 'The context for the task', 'type': 'str'}, 'coworker': {'description': 'The role/name of the coworker to delegate to', 'type': 'str'}}

Possible Solution

I don't know how the coworkers are found.
What is calling.arguments.get("coworker")?

Additional context

.

@antoinedelplace antoinedelplace added the bug Something isn't working label Dec 19, 2024
@naredlarohithreddy
Copy link

@antoinedelplace got any solution for the issue, i think we need to provide the context of one agent to other agent in form the some structure , so that the second agent will know what to do when the delegation occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants