main.py 872 B

1234567891011121314151617181920212223242526272829303132333435
  1. import argparse
  2. import gmagent
  3. from gmagent import *
  4. from functions_prompt import system_prompt
  5. def main():
  6. parser = argparse.ArgumentParser(description="Set email address")
  7. parser.add_argument("--gmail", type=str, required=True, help="Your Gmail address")
  8. args = parser.parse_args()
  9. print(f"{args.gmail=}")
  10. gmagent.set_email_service(args.gmail)
  11. greeting = llama31("hello", "Your name is Gmagent, an assistant that can perform all Gmail related tasks for your user.")
  12. agent_response = f"{greeting}\n\nYour ask: "
  13. agent = Agent(system_prompt)
  14. while True:
  15. ask = input(agent_response)
  16. if ask == "bye":
  17. print(llama31("bye"))
  18. break
  19. print("\n-------------------------\nCalling Llama...")
  20. agent(ask)
  21. agent_response = "Your ask: "
  22. if __name__ == "__main__":
  23. main()