mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-03 09:21:45 +00:00
draft bug fix
This commit is contained in:
parent
61e837380c
commit
a7d29952b0
3 changed files with 7 additions and 3 deletions
|
@ -26,7 +26,11 @@ pip install -r requirements.txt
|
||||||
|
|
||||||
# Run Email Agent
|
# Run Email Agent
|
||||||
|
|
||||||
The steps are also the same as the [original app]((https://github.com/meta-llama/llama-recipes/tree/gmagent/recipes/use_cases/email_agent).
|
The steps are also the same as the [original app]((https://github.com/meta-llama/llama-recipes/tree/gmagent/recipes/use_cases/email_agent):
|
||||||
|
|
||||||
|
```
|
||||||
|
python main.py --gmail <your_gmail_address>
|
||||||
|
```
|
||||||
|
|
||||||
# Implementation Notes
|
# Implementation Notes
|
||||||
Notes here mainly cover how custom tools (functions) are defined and how the Llama Stack Agent class is used with the custom tools.
|
Notes here mainly cover how custom tools (functions) are defined and how the Llama Stack Agent class is used with the custom tools.
|
||||||
|
|
|
@ -423,7 +423,7 @@ def create_forward_draft(message_id, recipient_email, custom_message=None):
|
||||||
def send_draft(id):
|
def send_draft(id):
|
||||||
sent_message = service.users().drafts().send(
|
sent_message = service.users().drafts().send(
|
||||||
userId=user_id,
|
userId=user_id,
|
||||||
body={'id': id}
|
body={'id': memory['draft_id']}
|
||||||
).execute()
|
).execute()
|
||||||
return f"Draft sent with email ID: {sent_message['id']}"
|
return f"Draft sent with email ID: {sent_message['id']}"
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@ async def main():
|
||||||
elif tool_name == "get_pdf_summary":
|
elif tool_name == "get_pdf_summary":
|
||||||
output = result
|
output = result
|
||||||
|
|
||||||
print(f"\n-------------------------\n\nGmagent: {output}\n")
|
print(f"\n-------------------------\n\nAgent: {output}\n")
|
||||||
elif log.role == "inference":
|
elif log.role == "inference":
|
||||||
print("Llama returned: ", end="")
|
print("Llama returned: ", end="")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue