" # Normally, it is helpful to have it set to True however.\n",
" verbose=False,\n",
")"
")"
]
]
},
},
@ -145,18 +174,11 @@
"tags": []
"tags": []
},
},
"outputs": [
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"WARNING:root:Failed to load default session, using empty session: 0\n",
"WARNING:root:Failed to persist run: {\"detail\":\"Not Found\"}\n"
]
},
{
{
"data": {
"data": {
"text/plain": [
"text/plain": [
"'I have created a draft email for you to edit. The draft Id is r5681294731961864018.'"
"{'input': 'Create a gmail draft for me to edit of a letter from the perspective of a sentient parrot who is looking to collaborate on some research with her estranged friend, a cat. Under no circumstances may you send the message, however.',\n",
" 'output': 'I have created a draft email for you to edit. Please find the draft in your Gmail drafts folder. Remember, under no circumstances should you send the message.'}"
]
]
},
},
"execution_count": 19,
"execution_count": 19,
@ -165,41 +187,38 @@
}
}
],
],
"source": [
"source": [
"agent.run(\n",
"agent_executor.invoke(\n",
" \"Create a gmail draft for me to edit of a letter from the perspective of a sentient parrot\"\n",
" {\n",
" \" who is looking to collaborate on some research with her\"\n",
" \"input\": \"Create a gmail draft for me to edit of a letter from the perspective of a sentient parrot\"\n",
" \" estranged friend, a cat. Under no circumstances may you send the message, however.\"\n",
" \" who is looking to collaborate on some research with her\"\n",
" \" estranged friend, a cat. Under no circumstances may you send the message, however.\"\n",
" }\n",
")"
")"
]
]
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 24,
"execution_count": 20,
"metadata": {
"metadata": {
"tags": []
"tags": []
},
},
"outputs": [
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"WARNING:root:Failed to load default session, using empty session: 0\n",
"WARNING:root:Failed to persist run: {\"detail\":\"Not Found\"}\n"
]
},
{
{
"data": {
"data": {
"text/plain": [
"text/plain": [
"\"The latest email in your drafts is from hopefulparrot@gmail.com with the subject 'Collaboration Opportunity'. The body of the email reads: 'Dear [Friend], I hope this letter finds you well. I am writing to you in the hopes of rekindling our friendship and to discuss the possibility of collaborating on some research together. I know that we have had our differences in the past, but I believe that we can put them aside and work together for the greater good. I look forward to hearing from you. Sincerely, [Parrot]'\""
"{'input': 'Could you search in my drafts for the latest email? what is the title?',\n",
" 'output': 'The latest email in your drafts is titled \"Collaborative Research Proposal\".'}"
]
]
},
},
"execution_count": 24,
"execution_count": 20,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
],
],
"source": [
"source": [
"agent.run(\"Could you search in my drafts for the latest email?\")"
"agent_executor.invoke(\n",
" {\"input\": \"Could you search in my drafts for the latest email? what is the title?\"}\n",