Update README.md

This commit is contained in:
Sar 2025-02-12 23:46:10 +08:00 committed by GitHub
parent 6146f9e0c6
commit 02ec50527e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,7 +10,9 @@
- **AI-Powered Conversations**: Communicate with AI entities in Minecraft by sending messages prefixed with `@bot`. The AI will respond intelligently, providing a dynamic and engaging interaction.
- **Ollama Integration**: Leverage the advanced capabilities of Ollama to enhance your Minecraft experience.
- **Simple Commands**: Use the `/ollamareload` command to reload the plugin configuration instantly, ensuring seamless updates without server restarts.
- **Multi-Language Support**: Supports multiple languages (e.g., English, Simplified Chinese) through language files in the `lang` folder.
- **Toggle AI Services**: Enable or disable AI services dynamically using the `/ollamachat toggle <ai-name>` command.
- **Simple Commands**: Use the `/ollamachat reload` command to reload the plugin configuration instantly, ensuring seamless updates without server restarts.
## Usage
@ -25,25 +27,33 @@ To interact with the AI, simply type `@bot` followed by your message in the Mine
### Commands
- **/ollamareload**: Reloads the plugin configuration, allowing you to apply changes to settings or AI models without restarting the server.
- **/ollamachat reload**: Reloads the plugin configuration, including language files and AI settings.
- **/ollamachat toggle <ai-name>**: Enables or disables the specified AI service.
- **/aichat <ai-name> <prompt>**: Interacts with other AI services (e.g., OpenAI).
**Example:**
```
/aichat openai Tell me a joke
```
## Installation
1. **Download the Plugin**: Obtain the latest version of **Ollama-Chat** from the [official repository](https://github.com/mcraftbbs/Ollama-Chat).
2. **Install the Plugin**: Place the downloaded `.jar` file into the `plugins` folder of your Minecraft server.
3. **Configure the Plugin**: Modify the `config.yml` file to customize AI settings.
4. **Reload the Plugin**: Use the `/ollamareload` command to apply any configuration changes.
4. **Add Language Files**: Place language files (e.g., `en.lang`, `zh_cn.lang`) in the `lang` folder.
5. **Reload the Plugin**: Use the `/ollamachat reload` command to apply any configuration changes.
## Configuration
The plugin's configuration file (`config.yml`) allows you to customize various aspects of the AI interactions.
The plugin's configuration file (`config.yml`) allows you to customize various aspects of the AI interactions.
Example `config.yml`:
```yaml
# Ollama API
ollama-api-url: "http://localhost:11434/api/generate"
model: "llama3"
ollama-enabled: true
# Chat
trigger-prefix: "@bot "
@ -51,6 +61,17 @@ response-prefix: "§b[AI] §r"
# Length
max-response-length: 500
# Language Settings
language: "en" # Default language (en or zh_cn)
# Other AI Configurations
other-ai-configs:
openai:
api-url: "https://api.openai.com/v1/chat/completions"
api-key: "your-openai-api-key"
model: "gpt-4"
enabled: true
```
## Contributing
@ -68,3 +89,8 @@ For assistance, questions, or feedback, please visit our [GitHub repository](htt
---
**Note**: **Ollama-Chat** is actively developed, with new features and improvements being added regularly. Stay tuned for updates!
```
---
**Note**: **Ollama-Chat** is actively developed, with new features and improvements being added regularly. Stay tuned for updates!