Unit_3_Agentic_RAG / Integrate the Tool with Alfred
ATK20's picture
Create Integrate the Tool with Alfred
27c769d verified
raw
history blame contribute delete
398 Bytes
from smolagents import CodeAgent, HfApiModel
# Initialize the Hugging Face model
model = HfApiModel()
# Create Alfred, our gala agent, with the guest info tool
alfred = CodeAgent(tools=[guest_info_tool], model=model)
# Example query Alfred might receive during the gala
response = alfred.run("Tell me about our guest named 'Lady Ada Lovelace'.")
print("🎩 Alfred's Response:")
print(response)