Integrations
LlamaHub Integration

Usage with Llama Hub 🦙

Llama Hub integrated version

Setup OpenAI Configuration

Import the required libraries and set up your OpenAI API key:

import openai
from llama_index.agent import OpenAIAgent
 
openai.api_key = 'sk-your-key'

MultiOn Tool Initialization

Import the MultiOn tool library and initialize the tool:

from llama_hub.tools.multion.base import MultionToolSpec
 
multion_tool = MultionToolSpec()

OpenAI Agent Initialization and Chat

Create an OpenAI agent using MultiOn tools and perform a chat:

agent = OpenAIAgent.from_tools(
    multion_tool.to_tool_list(),
    max_function_calls=10,
    verbose=True,
)
 
response = agent.chat('What is the most recent blog post from OpenAI?')
print(response)