Commit Graph

3 Commits

Author SHA1 Message Date
8e44c11385 feat(api): major refactor from TCP socket to HTTP REST via Spring Boot
This commit introduces a large-scale refactor that replaces the existing TCP-based API with a Spring Boot-powered HTTP REST architecture. Due to the size and scope of this change, only essential structural notes are included below.

High-level changes:
- Replaced TCP-based communication with RESTful endpoints
- Introduced Spring Boot for API handling and configuration
- Refactored internal core logic to support REST architecture

New/Updated API components:
- `APIApplication.java`: Main Spring Boot entry point
- `MessageController.java`: Handles LLM-related queries
- `ToolController.java`: Handles adding/removing tools
- `NewToolRequest.java` / `NewToolResponse.java`: Data models for tool addition
- `NewQueryResponseHook.java`: Webhook handler for LLM query results
- `WebhookError.java`: Model for reporting webhook errors
- `EnableIfNotDisplay.java`: Conditional configuration for TTY context
- Other supporting classes (e.g., `ToolArgument`, `ToolRequest`)

Core changes:
- `Core.java`: Removed deprecated `addFunctionTool`, added `removeTool`
- `LaunchOptions.java`: Added `notDisplay` flag for headless operation
- `OllamaObject.java`: Implements tool removal logic

Launcher/display changes:
- `Launcher.java`: Starts `APIApplication` if not in TTY mode
- `Display.java`: Integrates REST API contextually with TTY display

NOTE: Several classes are included but not yet fully utilized; these are placeholders for upcoming features (e.g., `MessageResponse`, `ToolRequest`).

BREAKING CHANGE: This refactors removes all TCP-based API code and replaces it with HTTP REST using Spring Boot. Any clients or modules depending on the old TCP interface will need to be updated.
2025-05-24 18:11:58 +02:00
5c3efa1376 Added My Anime List API wrapper
for documentation on MAL API check out the [API docs](https://myanimelist.net/apiconfig/references/api/v2)

Display:Display.java
- Switched the AI model to `qwen3:8b`
- some temporary test changes
- switched to using static references when supposed too

MALAPITool
- Module for handling the MAL API

MALAPITool:README.md
- Some general information about the tools

Started adding some base systems for finding API endpoints, will later be added to the API module for the ability to add plugins

.gitignore
- Added so all data folder are ignored. So submodules data folder from testing aren't added to git

Core:OllamaObject.java
- switched location of messages.json from the static location of `./cache/` to the dynamic location of `${Core.DATA_DIR}/messages.json`

Core:OllamaPerameter.java
- Added ENUM and ARRAY values. Incidentally also discover that Ollama supports more than just STRING, INT, and BOOLEAN ad parameters

Core:Core.java
- Added precluding day to the name of logging files, now using the format dd_HH-mm-ss
2025-05-23 15:24:58 +02:00
b892306c09 Basicly refactord the entire project into a modular nature 2025-02-20 23:28:24 +01:00