AIChatbot is a versatile Arduino library for integrating various AI chatbot APIs. It supports connecting to OpenAI's ChatGPT, Hugging Face Api's.
- 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.
-
Download the Library: Download or clone this repository.
-
Import into Arduino IDE:
- Open Arduino IDE.
- Go to Sketch > Include Library > Add .ZIP Library... and select the downloaded ZIP file.
-
Dependencies:
- This library requires the
WiFi
andHTTPClient
libraries for making HTTP requests. Make sure to install these libraries through the Library Manager in Arduino IDE if not already installed.
- This library requires the
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();
}
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.
For detailed documentation, please refer to Docs.md.
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! 😊