Description
Changelog
Reviews (0)
Addis AI for Godot
AI-powered chat integration for Godot using the Addis AI API.
Addis AI makes it easy to integrate conversational AI into your Godot games, tools, and editor plugins with an asynchronous, callback-based API.
Features
- Simple chat API
- Async requests
- Callback support
- Godot 4.x compatible
- Lightweight
- Easy installation
- Supports system and user messages
- Plugin autoload included
Installation
- Download or clone this repository.
- Copy the
addons/addisaifolder into your Godot project'saddonsdirectory. - Enable the plugin:
Project
→ Project Settings
→ Plugins
→ Addis AI
→ Enable
- Create a
.envfile in your project root.
Example:
ADDISAI_API_KEY=your_api_key_here
Basic Usage
extends Control
func _ready():
ask_ai()
func ask_ai():
await AddisAI.chat.create(
"am",
"Answer shortly.",
[
{
"role": "user",
"content": "Hello, Tell me an Amharic folktale."
}
],
_on_chat_response
)
func _on_chat_response(res):
print(res["data"]["response_text"])
Chat Parameters
AddisAI.chat.create(
language,
system_prompt,
messages,
callback
)
language
Language code.
Example:
"am"
system_prompt
Instructions for the AI.
"Answer shortly."
messages
Array of chat messages.
Example:
[
{
"role": "user",
"content": "Hello!"
}
]
Supported roles:
- system
- user
- assistant
callback
Function that receives the API response.
func _on_chat_response(response):
print(response)
Example Response
{
"success": true,
"data": {
"response_text": "..."
}
}
Access the generated text:
print(response["data"]["response_text"])
Error Handling
Example:
func _on_chat_response(response):
if response["success"]:
print(response["data"]["response_text"])
else:
print(response["error"])
Requirements
- Godot 4.x
- Internet connection
- Addis AI API Key
Folder Structure
addons/
└── addisai/
├── plugin.cfg
├── plugin.gd
├── addisai.gd
├── chat/
├── dotenv/
└── ...
Roadmap
- Streaming responses
- Image generation
- Embeddings
- Speech-to-text
- Text-to-speech
- Function calling
- Vision support
Contributing
Contributions, issues, and pull requests are welcome.
License
This project is licensed under the MIT LICENSE.
Changelog for version v1.0.0
No changelog provided for this version.