Migrate to pyproject.toml and register as ChatEngine (opm.agents.chat) - #18
Conversation
Move packaging from setup.py to pyproject.toml, matching the sibling ovos-solver-plugin-aiml layout, and register the plugin under the modern opm.agents.chat entry point group by porting RiveScript to ChatEngine. The legacy neon.plugin.solver entry point is kept pointing at the original RivescriptSolver class, so nothing that still looks there breaks. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThe package moves to ChangesPlugin packaging and release integration
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant RivescriptChatEngine
participant RiveScriptBrain
Caller->>RivescriptChatEngine: continue_chat(messages)
RivescriptChatEngine->>RiveScriptBrain: reply(latest user message)
RiveScriptBrain-->>RivescriptChatEngine: response text
RivescriptChatEngine-->>Caller: assistant AgentMessage
✨ Finishing Touches 💡 1⚔️ Resolve merge conflicts 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
I've completed the automated review of your changes. 📑I've aggregated the results of the automated checks for this PR below. 🔨 Build TestsMeasuring the stability of the build output. 📏 ✅ All versions pass
Your loyal script, at your command 🫡 |
This repo was still a setup.py package, and its only entry point was the pre-OPM
neon.plugin.solvergroup. I went and checked what current ovos-plugin-manager (2.11.1a2, the version this venv actually runs) does with that group before touching anything, because I did not want to assume. It turns outneon.plugin.solveris aliased toopm.solver.questionthrough a backwards-compat shim infind_plugins, so this plugin is not literally invisible today, it still answers through the deprecated QuestionSolver path. But that alias only exists becauseopm.solver.questionitself is deprecated and slated for removal in ovos-plugin-manager 3.0.0, and RiveScript is a pattern matcher with no real use for a QuestionSolver's single-turn API, so leaving it there just delays the actual breakage instead of fixing it.So this PR does two things. First it swaps setup.py for a pyproject.toml, following the same layout as ovos-solver-plugin-aiml (the closest sibling, also a classic chatbot solver already migrated). Second it ports the RiveScript brain to a
ChatEngineand registers it underopm.agents.chat, which is the group ovos-persona-server and any future OVOS persona pipeline actually query going forward.continue_chattakes the last user message and asks the brain for a reply the same way the oldget_spoken_answerdid; it accepts atoolskeyword because the baseChatEngine.continue_chatsignature requires it, but RiveScript has no notion of tool calling so it is ignored andsupports_toolsstays False.The old
RivescriptSolverclass is untouched and still registered underneon.plugin.solver, so anything that still loads it by that old group keeps working exactly as before. Nothing was removed, only added and reorganized.I installed the plugin in two fresh venvs to check this rather than trust the diff: one against this branch, one against unmodified dev.
find_plugins("opm.agents.chat")returns{}on unmodified dev and returns{'ovos-solver-rivescript-plugin': <class 'ovos_solver_rivescript_plugin.RivescriptChatEngine'>}on this branch.find_plugins("neon.plugin.solver")still returns the originalRivescriptSolverclass on both. There were no tests in this repo before; I added test/test_plugin.py covering both entry points and acontinue_chatcall including atools=kwarg to prove it does not raise. All 5 tests pass. A separate PR builds a Docker image on top of this one and does a live chat-completions round trip against the resulting server.Summary by CodeRabbit
New Features
Improvements
Tests
Release