Skip to main content

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.workflow import ReActAgent

tool_spec = gmail_agent_pack.tool_spec
agent = ReActAgent(tools=tool_spec.to_tool_lost(), llm=llm)

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

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file llama_index_packs_gmail_openai_agent-0.4.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_packs_gmail_openai_agent-0.4.1.tar.gz
Algorithm Hash digest
SHA256 3023999327587681f182b4cf060e9533f013c150a08a50e27e7e1fe1ec5743bd
MD5 d935f770aed89a8c25b231163872c0f0
BLAKE2b-256 11e235ba2047158aa355a74c47fc25f691c38a4c4501b8fb49625b7472ba5e5b

See more details on using hashes here.

File details

Details for the file llama_index_packs_gmail_openai_agent-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_packs_gmail_openai_agent-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b6e40af66c3c81e2f1a5da272965761f31bc5a2499e35741fa694381f28dcea7
MD5 1a67de1be15cf9008170885faebbe2be
BLAKE2b-256 76a7729d8a9c687ed7c72e810d5f647df45fe305b486b281fa3ff5d500d31047

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page