Skip to content

๐Ÿค–๐Ÿ’ฌ Arduino library for integrating AI chat like OpenAI's ChatGPT, Hugging Face Transformers, and more.

License

Notifications You must be signed in to change notification settings

bayeggex/Arduino-AI-Chat-Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Chat Library for Arduino
๐Ÿค–๐Ÿ’ฌ

GitHub GitHub release (latest by date including pre-releases) PlatformIO Registry arduino-library-badge GitHub last commit GitHub issues

tenor

AIChatbot is a versatile Arduino library for integrating various AI chatbot APIs. It supports connecting to OpenAI's ChatGPT, Hugging Face Api's.

โœจ Features

  • Versatile AI Integration: Integrate various AI chatbot APIs seamlessly into your Arduino projects.
  • Supports Multiple APIs: Connect to OpenAI's ChatGPT, Hugging Face APIs, and more with ease.
  • Easy Setup: Simple API key configuration and setup for quick deployment.
  • Real-time Interaction: Handle real-time messages and responses over WiFi.
  • Flexible AI Selection: Choose between different AI versions such as "gpt-3.5-turbo","gpt-4" (more will be integrated)
  • Community-driven: Contributions and improvements from the community are welcomed and encouraged.

๐Ÿ”งInstallation

  1. Download the Library: Download or clone this repository.

  2. Import into Arduino IDE:

    • Open Arduino IDE.
    • Go to Sketch > Include Library > Add .ZIP Library... and select the downloaded ZIP file.
  3. Dependencies:

    • This library requires the WiFi and HTTPClient libraries for making HTTP requests. Make sure to install these libraries through the Library Manager in Arduino IDE if not already installed.

๐Ÿš€Usage

Setting Up AI Keys

Before using the AIChatbot library, you need to set your API keys for the respective AI services. You can do this in your sketch code:

#include <AIChatbot.h>

AIChatbot chatbot;

void setup() {
    chatbot.begin(115200);
    
    // Set API keys
    chatbot.setKey("YOUR_CHATGPT_API_KEY", "chatgpt");
    chatbot.setKey("YOUR_HUGGING_FACE_API_KEY", "huggingface");

    // Connect to WiFi
    if (!chatbot.connectWiFi("SSID", "PASSWORD")) {
        Serial.println("Failed to connect to WiFi");
        while (true); // Halt if WiFi connection fails
    }
    
    // Select AI service and optionally specify version
    chatbot.selectAI("chatgpt", "gpt-3.5-turbo");
}

void loop() {
    // Update and handle incoming messages
    chatbot.update();
}

๐Ÿค Contributing

Contributions are welcome! To contribute to AIChatbot, fork this repository, make improvements, and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.

Fork the repository.
Create a new branch: git checkout -b feature/amazing-feature
Commit your changes: git commit -m 'Add some amazing feature'
Push to the branch: git push origin feature/amazing-feature
Open a pull request.

๐Ÿ“š Documentation

For detailed documentation, please refer to Docs.md.

๐Ÿ“„ License

This project is licensed under the MIT License. See the LICENSE file for more details.

If you find this project helpful or interesting, don't forget to give it a star! โญ

Express yourself freely and elevate your chat experience with Arduino-AI-Chat-Library! ๐Ÿ˜Š