This major release introduces comprehensive web search capabilities with multi-engine support (Bocha and Brave), enhanced configuration management, and improved user experience with new commands and language switching. The update focuses on bringing real-time information retrieval to AI conversations while maintaining flexibility for international users. This version supports Minecraft 1.20.x through 1.21.x.
[*]New permissions added for search management:
- ollamachat.search.toggle - Enable/disable search
- ollamachat.search.status - View search status
- ollamachat.search.query - Perform manual searches
- ollamachat.search.setkey - Set API keys
- ollamachat.search.setcount - Configure result count
- ollamachat.search.keywords - Manage trigger keywords
- ollamachat.search.engine - Change search engine
[*]New Search Management Commands:
- /ollamachat search toggle - Enable/disable web search
- /ollamachat search status - View current search configuration
- /ollamachat search engine [name] - Show/change search engine
- /ollamachat search setkey <engine> <key> - Set API key for engines
- /ollamachat search setcount <number> - Configure result count
- /ollamachat search addkeyword <word> - Add trigger keywords
- /ollamachat search removekeyword <word> - Remove trigger keywords
- /ollamachat search listkeywords - List all trigger keyword
Overview This release reintroduces HikariCP for enhanced MySQL database performance and adds a public API for other plugins to interact with OllamaChat's AI chat functionality. It focuses on improving database efficiency, extensibility, and developer integration while maintaining compatibility with existing configurations.
New Features
HikariCP Integration:
Added HikariCP connection pooling for MySQL databases to improve performance and resource management.
Configurable HikariCP settings in config.yml under database.mysql.hikari for tuning connection pool parameters (e.g., maximum-pool-size, connection-timeout).
Public API:
Introduced OllamaChatAPI interface (com.ollamachat.api.OllamaChatAPI) for other plugins.
Supports sending AI queries, managing conversations, and accessing chat history programmatically with methods like sendAIQuery, createConversation, and listConversations.
Added API documentation in API.md for developer integration.
Enhancements
Database Management:
Updated DatabaseManager to leverage HikariCP for MySQL connections, while preserving SQLite functionality.
Dependency Management:
Updated DependencyLoader to include HikariCP (version 5.1.0) alongside MySQL and SQLite JDBC drivers, downloaded at runtime to plugins/OllamaChat/libs.
Maintained compileOnly in build.gradle for non-Paper dependencies to minimize JAR size.
Configuration:
Added database.mysql.hikari section to config.yml with default settings for connection pooling.
Improved config.yml comments for clarity and ease of use.
Bug Fixes
No specific bug fixes in this release, as the focus was on new features and performance improvements.
Notes for Upgrading
Configuration:
Update config.yml to include the database.mysql.hikari section if using MySQL. Default values are added automatically.
Backup existing config.yml before updating to avoid data loss.
Dependencies:
The plugin downloads HikariCP (version 5.1.0) automatically on first startup. Ensure server internet access or verify HikariCP-5.1.0.jar in plugins/OllamaChat/libs.
Delete the libs folder to force re-download if dependencies are corrupted.
API Integration:
Developers can hook into OllamaChat using OllamaChatAPI. Add softdepend: [OllamaChat] to plugin.yml and refer to Github API.md.
Compatibility:
This update is backward-compatible with existing configurations and databases.
Testing:
Test database operations (e.g., /ollamachat conversation new) to verify MySQL/SQLite functionality.
Check server logs for dependency loading or database errors.
Known Issues
HikariCP settings may require manual tuning for optimal performance based on server load and MySQL configuration.
Fixed Default Language Error: Corrected incorrect default language setting in the configuration file.
Configuration Updates
New Configuration Options: suggested-response-count: 3 suggested-response-prompt: "Conversation:\nUser: {prompt}\nAI: {response}\n\nBased on the above conversation, suggest {count} natural follow-up responses the user might want to say. They should be conversational in tone rather than questions. List them as:\n1. Response 1\n2. Response 2\n3. Response 3" suggested-response-presets: - "I see what you mean." - "That's interesting!" - "Tell me more about that." suggested-response-presets-enabled: false suggested-response-model-toggles: - llama3 suggested-response-cooldown: 10
Note: Backup existing configuration before updating to ensure compatibility with new structure.
Optimizations
Improved suggestion generation logic for faster and more accurate responses.
New permissions: ollamachat.suggests.toggle and ollamachat.suggests-presets.toggle.
Important Notes:
Configuration Changes:
New configuration options added for enhanced suggestion customization.
Recommended to back up old config and regenerate.
Delete lang directory to regenerate localization files.
Suggested responses and presets are disabled by default; enable via configuration.