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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47f373efa878789cb7978af2e679fcf9c551b2274487a187b46702d0d9ca6982 |
|
MD5 | e532d215b24cd2c1623442804937dfd6 |
|
BLAKE2b-256 | 49054ebbe665cb649b5a7531b4684271f7a0c876e3c156a4bbd160672841de06 |
Close
Hashes for llama_index_packs_gmail_openai_agent-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b98efed014161eb87ec866a283f17c944a3cdcde6726559d5495243d2e3bba2c |
|
MD5 | bd9c011a3510236e0ba27a8831cbf75a |
|
BLAKE2b-256 | 228dbf681e7d0c9f7e3066312ebfe63a7026ee26230367cae78b4e76437939f2 |