ollama-anime
v1.0.0
Published
Chat with various types of anime characters with the ollama you have.
Readme
✨ OLLAMA-ANIME
Chat with various types of anime characters with the ollama you have.
📌Character list
- alya
- bocchi
- elaina
- fern
- frieren
- furina
- hoshino
- hutao
- ikuyo
- lishiya
- mahiru
- mikasa
- miko
- raiden
- reze
- rikka
- ryo
- shiroko
- tsukasa
- waguri
- yanami
- yuki
- yuuka
📝installation stages
Make sure ollama is installed on your PC or local server, check the existence of your ollama with the command ollama --version in the terminal, if you have not installed ollama, please install it at Ollama, then please install the model you want at Ollama model, if you want a 100% free model, choose a model that does not have the cloud tag.
⚙️Install ollama-anime
npm install ollama-anime🚀 How to Use
This library provides asynchronous functions to communicate with your Ollama models.
const { chat, characterList } = require('ollama-anime');
async function main() {
// 1. Connection Configuration & Model
const connection = {
ip: 'http://localhost:11434', // Your Ollama Host
model: 'llama3' // The model you are using
};
// 2. Message & Character Data
const payload = {
question: 'Halo, apa kabar?',
character: 'furina' // Select from the list of characters below
};
// 3. Execution
const response = await chat(connection, payload);
if (response.status === 200) {
console.log('AI Response:', response.content);
} else {
console.log('Error:', response.message);
}
}
main();🛠️ API Parameters
The chat function accepts two objects as parameters:
Parameter 1: Configuration (Object) :
| Key | Type | Description | |-------|------|------| | ip | String | Ollama host full URL (Example: http://127.0.0.1:11434) | | model | String | The name of the model installed on your Ollama (Example: gemma, llama3, mistral) |
Parameter 2: Payload (Object) :
| Key | Type | Description | |-------|------|------| | question | String | Questions or messages you want to send to the AI | | character | String | Name of the anime character you want to use (Case sensitive) |
📥 Response Given
The library will always return an object with the following structure:
If Successful (Status 200)
{
"status": 200,
"content": "Halo! Aku Furina. Ada yang bisa aku bantu hari ini?"
}Jika Gagal (Status 4xx / 5xx)
{
"status": 404,
"message": "Character \"unknown\" not found, please check the character name again"
}Tip: You can also call the characterList() function in your code to programmatically get a list of characters in Array form.
