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.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b078f742fd3a2add6792d8c63716a200f17f7e0e846e5d49c03731e96769bb39 |
|
MD5 | 4093dc440fdc2b63ca674457ad2abc6d |
|
BLAKE2b-256 | d2564ebbe224ae46cbf56a965fb1170658cbdcaabb5aea43a27c570df25fde7d |
Close
Hashes for llama_index_packs_gmail_openai_agent-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcb412b66eb8548fa9f890767a60977c1443fdc780e99c78c35bbb6b794caef5 |
|
MD5 | 7ebfaa58e55dd391bd7bdfd0a0fed418 |
|
BLAKE2b-256 | 9c5339a7baba4dc67d4d95365690922699c71e929ed67d4532e5989b0766c804 |