ATK20 commited on
Commit
27c769d
·
verified ·
1 Parent(s): 8488c37

Create Integrate the Tool with Alfred

Browse files
Files changed (1) hide show
  1. Integrate the Tool with Alfred +13 -0
Integrate the Tool with Alfred ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from smolagents import CodeAgent, HfApiModel
2
+
3
+ # Initialize the Hugging Face model
4
+ model = HfApiModel()
5
+
6
+ # Create Alfred, our gala agent, with the guest info tool
7
+ alfred = CodeAgent(tools=[guest_info_tool], model=model)
8
+
9
+ # Example query Alfred might receive during the gala
10
+ response = alfred.run("Tell me about our guest named 'Lady Ada Lovelace'.")
11
+
12
+ print("🎩 Alfred's Response:")
13
+ print(response)