fix(ai): migrate AiIntegrationsService off deprecated TextProcessing API#13151
Draft
hamza221 wants to merge 2 commits into
Draft
fix(ai): migrate AiIntegrationsService off deprecated TextProcessing API#13151hamza221 wants to merge 2 commits into
hamza221 wants to merge 2 commits into
Conversation
Replace the OCP\TextProcessing API (deprecated since Nextcloud 30.0.0) with OCP\TaskProcessing throughout the AI integrations: - FreePromptTaskType -> TextToText (core:text2text) - SummaryTaskType -> TextToTextSummary (core:text2text:summary) - task input/output now use the ['input' => ...] / getOutput()['output'] shape - availability checks switch from in_array(class, list) to isset(types[id]) - drop the now-unused TextProcessingManager constructor dependency Callers that fed the old class constants to isLlmAvailable (AdminSettings, PageController, FollowUpClassifierListener) and the unit tests are updated to the new task type IDs. Two now-obsolete psalm-baseline entries are removed. Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
Move the inline prompt templates out of AiIntegrationsService into a dedicated DefaultPrompts class. Templates use sprintf placeholders; the argument order is documented on each constant. Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
d1f8c04 to
d8de3c0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lib/Service/AiIntegrations/DefaultPrompts.phpAssisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: Hamza hamzamahjoubi221@gmail.com
🤖 AI (if applicable)