You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying out using Agno with hugging face inference, but getting an error.
question:
How can i create my own tools and use them with agents
ERROR details:
agent=Agent(
model=HuggingFace(
id="meta-llama/Meta-Llama-3-70B-Instruct",
),
tools=[DuckDuckGoTools(), Newspaper4kTools()],
description="You are a senior NYT researcher writing an article on a topic.",
instructions=[
"For a given topic, search for the top 5 links.",
"Then read each URL and extract the article text, if a URL isn't available, ignore it.",
"Analyse and prepare an NYT worthy article based on the information.",
],
markdown=True,
show_tool_calls=True,
add_datetime_to_instructions=True,
)
agent.print_response("Simulation theory", stream=True)
Error:
▰▰▰▰▰▰▱ Thinking...
┏━ Message ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ┃
┃ Simulation theory ┃
┃ ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[<ipython-input-38-576a1e1a3861>](https://localhost:8080/#) in <cell line: 0>()
32 )
33
---> 34 agent.print_response("Simulation theory", stream=True)
3 frames
[/usr/local/lib/python3.11/dist-packages/agno/agent/agent.py](https://localhost:8080/#) in print_response(self, message, messages, audio, images, videos, stream, markdown, show_message, show_reasoning, show_full_reasoning, console, tags_to_include_in_markdown, **kwargs)
3358 if render:
3359 live_log.update(Group(*panels))
-> 3360 forrespin self.run(
3361 message=message, messages=messages, audio=audio, images=images, videos=videos, stream=True, **kwargs
3362 ):
[/usr/local/lib/python3.11/dist-packages/agno/agent/agent.py](https://localhost:8080/#) in _run(self, message, stream, audio, images, videos, messages, stream_intermediate_steps, **kwargs)
532 if self.stream:
533 model_response = ModelResponse(content="")
--> 534 formodel_response_chunkin self.model.response_stream(messages=run_messages.messages):
535 # If the model response is an assistant_response, yield a RunResponse with the content
536 if model_response_chunk.event == ModelResponseEvent.assistant_response.value:
[/usr/local/lib/python3.11/dist-packages/agno/models/base.py](https://localhost:8080/#) in response_stream(self, messages)
455 assistant_message.audio_output = stream_data.response_audio
456 if stream_data.response_tool_calls and len(stream_data.response_tool_calls) > 0:
--> 457 assistant_message.tool_calls = self.parse_tool_calls(stream_data.response_tool_calls)
458
459 # Add assistant message to messages
[/usr/local/lib/python3.11/dist-packages/agno/models/huggingface/huggingface.py](https://localhost:8080/#) in parse_tool_calls(tool_calls_data)
327 for_tool_callin tool_calls_data:
328 _index = _tool_call.index
--> 329 _tool_call_id = _tool_call.id
330 _tool_call_type = _tool_call.type
331 _function_name = _tool_call.function.name if _tool_call.function else None
AttributeError: 'str' object has no attribute 'id'
The text was updated successfully, but these errors were encountered:
Hey @Himasnhu-AT! Thanks so much for raising this issue. I was able to replicate it on my end, too. We’ll make it a priority to fix this as soon as possible. Really appreciate your patience, and feel free to reach out if you have any more questions or concerns in the meantime!
Context:
I'm trying out using Agno with hugging face inference, but getting an error.
question:
ERROR details:
Error:
The text was updated successfully, but these errors were encountered: