Skip to content

Added Gaia as one of the providers#50

Open
harishkotra wants to merge 1 commit intoempyrealapp:mainfrom
harishkotra:main
Open

Added Gaia as one of the providers#50
harishkotra wants to merge 1 commit intoempyrealapp:mainfrom
harishkotra:main

Conversation

@harishkotra
Copy link

This PR adds a new provider to emp_agents that allows users to connect to their own Gaia Node for LLM inference.

What is Gaia?

Gaia is a decentralized computing infrastructure that enables everyone to create, deploy, scale, and monetize their own AI agents that reflect their styles, values, knowledge, and expertise.

It allows individuals and businesses to create AI agents. Each Gaia node provides:

  • a web-based chatbot UI
  • an OpenAI compatible API

How to launch a Gaia node: https://docs.gaianet.ai/getting-started/quick-start/

Example Usage

from emp_agents import AgentBase
from emp_agents.providers import GaiaProvider

# Create a Gaia provider
provider = GaiaProvider(
    url="https://your-gaia-node-url.com/v1/chat/completions",
    api_key="your-gaia-api-key",
    model_name="your-model-name"
)

# Create an agent using the Gaia provider
agent = AgentBase(provider=provider)

# Use the agent
response = await agent.answer("Hello, how can you help me today?")

Example Scripts

  1. Basic Example (examples/gaia_example.py): Shows simple usage with different types of queries
  2. Advanced Example (examples/gaia_advanced_example.py): Demonstrates multi-turn conversations and interactive mode

The implementation has been tested with a Gaia Node running Llama-3-Groq-8B-Tool-Use-Q5_K_M. The examples include error handling to accommodate different model capabilities.

image

Documentation

Added documentation in docs/gaia_provider.md that explains how to set up and use the Gaia provider, including code examples for basic and advanced usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant