Skip to content

jvcostta/multiple-agents-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-Agent Chatbot with Groq API

This project implements a multi-agent chatbot using the Groq API and Flask, allowing each agent to have specific training data and behavior. You can interact with the chatbot via POST requests for both chatting and training.

Features

  • Two pre-configured agents (Agent1 and Agent2).
  • Support for custom agent-specific training.
  • Easy-to-use RESTful API for interaction.

Requirements

  • Python 3.8+
  • A valid API Key from Groq (set in .env file).

Setup Instructions

  1. Clone this repository:
    git clone https://github.com/yourusername/your-repo-name.git
    cd your-repo-name
    
  2. Create a virtual environment:
    python -m venv venv
    source venv/bin/activate   # Linux/MacOS
    venv\Scripts\activate      # Windows
    
  3. Install dependencies:
    pip install -r requirements.txt
    
  4. Create a .env file in the root directory:
    GROQ_API_KEY=your_api_key_here
    
  5. Run the application:
    python app.py
    
  6. Access the API locally at http://127.0.0.1:5000.

API Endpoints

  1. Chat with an agent

    POST /chat/<agent_name>

  • request Body:
    {
    "user_input": "hello!, i would like to know where you from"
    }
    
  • response:
    {
     "response": "Hello! Welcome to Z! I'm happy to help you with that.."
    }
    
  1. Train an agent

    POST /train/<agent_name>

  • request Body:
    {
    "content": "You are Mario from Super Mario Bros. Answer as Mario, the assistant, only."
    }
    
  • response:
    {
     "message": "Training updated successfully!"
    }
    

Noter

  • Modify training/ files for persistent updates to agent training.
  • Ensure your .env file is never should be shared for security purposes.

License

  • This project is licensed under the MIT License.

About

multiple chatbot agents to differents applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages