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
File details
Details for the file llama_index_packs_gmail_openai_agent-0.3.0.tar.gz
.
File metadata
- Download URL: llama_index_packs_gmail_openai_agent-0.3.0.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f5029c96ac9160284f199ce31e6a4b535055a0f3754bda87385fd3c521cfea4 |
|
MD5 | 82916b5cccb42ae92895534b66094a2c |
|
BLAKE2b-256 | 4e369af02a5a10bb3053aa511e13c09377b438d636254c773d3a90f897d9b514 |
File details
Details for the file llama_index_packs_gmail_openai_agent-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_packs_gmail_openai_agent-0.3.0-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3df7f5a1d280b99986b3fd840e6619eb4661ca9407189e82639a52491b9c727 |
|
MD5 | 9c24cd81f56a295915b54a5a76a8565b |
|
BLAKE2b-256 | e4a66ed1d6e1c37d29406902707236db15158bf9aeca4cf5e50c31b5c954522e |