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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69afbb14fe38dd47a6c1d7768ee23995dee8cb7f8e8f2a46b9f30514a867cab7 |
|
MD5 | 4a2fbf40a48d2a3a263898abceddc349 |
|
BLAKE2b-256 | ed7b315f22869ab0247ba89901294bec4b5eacf980c91a56bb955053a25992ba |
Close
Hashes for llama_index_packs_gmail_openai_agent-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38a5273af379da299ac97ab23c12d2ec3a224b5c80a5e20035dd9e439a678959 |
|
MD5 | ab41100a2fbbd3a11d8b25137ccb8270 |
|
BLAKE2b-256 | 412cc97570b82b07d85a07c82c7c505d2f1ac7c000110b36442268c2293f0f6a |