Prechádzať zdrojové kódy

code and readme updated

Jeff Tang 4 mesiacov pred
rodič
commit
fa06774e83

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 19 - 19
recipes/use_cases/email_agent/README.md


BIN
recipes/use_cases/email_agent/email_agent.png


+ 2 - 2
recipes/use_cases/email_agent/gmagent.py

@@ -503,7 +503,7 @@ class Agent:
         self.system_prompt = system_prompt
         self.messages = []
 
-        # Gmagent-specific short term memory, used to answer follow up questions AFTER a list of emails is found matching user's query
+        # agent-specific short term memory, used to answer follow up questions AFTER a list of emails is found matching user's query
         self.emails = []
         self.draft_id = None
 
@@ -580,7 +580,7 @@ class Agent:
             elif function_name == "send_draft":
                 output = result
 
-            print(f"\n-------------------------\n\nGmagent: {output}\n")
+            print(f"\n-------------------------\n\nAgent: {output}\n")
         else:
             output = result # direct text, not JSON, response by Llama
 

BIN
recipes/use_cases/email_agent/gmagent.png


+ 5 - 5
recipes/use_cases/email_agent/main.py

@@ -1,17 +1,17 @@
 import argparse
-import gmagent
-from gmagent import *
+import email_agent
+from email_agent import *
 from functions_prompt import system_prompt
 
 
 def main():
     parser = argparse.ArgumentParser(description="Set email address")
-    parser.add_argument("--gmail", type=str, required=True, help="Your Gmail address")
+    parser.add_argument("--email", type=str, required=True, help="Your Gmail address")
     args = parser.parse_args()
 
-    gmagent.set_email_service(args.gmail)
+    email_agent.set_email_service(args.email)
 
-    greeting = llama31("hello", "Your name is Gmagent, an assistant that can perform all Gmail related tasks for your user.")
+    greeting = llama31("hello", "Your name is Email Agent, an assistant that can perform all email related tasks for your user.")
     agent_response = f"{greeting}\n\nYour ask: "
     agent = Agent(system_prompt)