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.agent 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.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c9bd1d147c6864f22316b1a9935e2fb798d16a67902150402fa01353d24268b |
|
MD5 | c8cb15f9a5fb27ee399e9a11e323fbb5 |
|
BLAKE2b-256 | 3185ad0138563860fc5d44fd0041d747e7c4376ac1d9c21b67138f7f6b6fcc15 |
Close
Hashes for llama_index_packs_gmail_openai_agent-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c668db341cfee95c9d3f2905f897b6a03763caf307acbf8d235a2466c31f0a78 |
|
MD5 | eeb0e52effade82fc57ea64aa8cea327 |
|
BLAKE2b-256 | d9ba1229e390b113614e98901d8040386c02dcc3a2ff13ead100c3e8a64981f2 |