I’m trying to initiate huggingface model to my agent
from agno.models.huggingface import HuggingFace
llm_model = HuggingFace(id=“meta-llama/Llama-3.2-1B-Instruct”,
max_tokens=500,)
product_search_agent = Agent(
name=“Product search agent”,
role=“Search the web for product information”,
model=llm_model,
tools=[DuckDuckGoTools(), ExaTools()],…)
product_agent = Agent(team=[product_search_agent],
model=llm_model,…)
error:
huggingface_hub.errors.UnknownError: {‘message’: “Input validation error: cannot compile regex from schema: ‘type’ must be a string”, ‘http_status_code’: 422}
I tried using non-instruct model and I’m getting a template not found error:
from agno.models.huggingface import HuggingFace
llm_model = HuggingFace(id=“meta-llama/Llama-3.2-1B-”,
max_tokens=500,)
error:
huggingface_hub.errors.HfHubHTTPError: 422 Client Error: Unprocessable Entity for url: https://api-inference.huggingface.co/models/meta-llama/Llama-3.2-1B/v1/chat/completions (Request ID: Root=1-67c05dca-5a7852d63e1c5fd2765b6b45;fd39c347-3255-4053-84e1-7c7a77539017)
Template error: template not found
Make sure ‘text-generation’ task is supported by the model.