llama-index packs gmail_openai_agent integration
Project description
Gmail OpenAI Agent Pack
Create an OpenAI agent pre-loaded with a tool to interact with Gmail. The tool used is the Gmail LlamaHub tool.
CLI Usage
You can download llamapacks directly using llamaindex-cli
, which comes installed with the llama-index
python package:
llamaindex-cli download-llamapack GmailOpenAIAgentPack --download-dir ./gmail_pack
You can then inspect the files at ./gmail_pack
and use them as a template for your own project!
Code Usage
You can download the pack to a the ./gmail_pack
directory:
from llama_index.core.llama_pack import download_llama_pack
# download and install dependencies
GmailOpenAIAgentPack = download_llama_pack(
"GmailOpenAIAgentPack", "./gmail_pack"
)
gmail_agent_pack = GmailOpenAIAgentPack()
From here, you can use the pack, or inspect and modify the pack in ./gmail_pack
.
The run()
function is a light wrapper around agent.chat()
.
response = gmail_agent_pack.run("What is my most recent email?")
You can also use modules individually.
# Use the agent
agent = gmail_agent_pack.agent
response = agent.chat("What is my most recent email?")
# Use the tool spec in another agent
from llama_index.core.agents import ReActAgent
tool_spec = gmail_agent_pack.tool_spec
agent = ReActAgent.from_tools(tool_spec.to_tool_lost())
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for llama_index_packs_gmail_openai_agent-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 486cfc580a43e8221774da0b57bd2d4d7ea40cb8debb8bb656973622af745805 |
|
MD5 | 5e659a3f34e80838cf22bdf846ba9b6e |
|
BLAKE2b-256 | 7f0e41bc4b5b092278491b4ca7272fc3c69fd879fdca6aa2fdbe9757a566c34a |
Close
Hashes for llama_index_packs_gmail_openai_agent-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 656f52e11a1283553f3612ae08e7dd6ef8aaad412be0d3b200ef172a30f28a6e |
|
MD5 | 2124f50f8f3d2b555b4dd198a497ce3c |
|
BLAKE2b-256 | 5a3b74c05f76249362377fb5ce2cd8810d3a948033b04d1c0d6a01f4f2df8d91 |