-
Notifications
You must be signed in to change notification settings - Fork 2.3k
enh(admin): Add "Insight and debugging" section in AI #13760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,3 +18,4 @@ Artificial Intelligence | |
| app_text2speech_kokoro | ||
| app_live_transcription | ||
| ai_as_a_service | ||
| insight_and_debugging | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| ===================== | ||
| Insight and debugging | ||
| ===================== | ||
|
|
||
| .. _ai-insight-and-debugging: | ||
|
|
||
| In order to gain insights and debug AI tasks, there are a number of occ commands | ||
| available in the `taskprocessing` namespace. | ||
|
|
||
| All commands listed here accept an `--output` parameter that can be set to `plain`, `json` or `json_pretty`. | ||
|
|
||
| Tasks are retained in the database for 6 months. Note, however, that there is no strict write-only guarantee for these logs. | ||
| This means Nextcloud will not change the task logs in the database once the task has ended, but any administrator with database access | ||
| has the power to change them. | ||
|
|
||
| Get a task by id | ||
| ---------------- | ||
|
|
||
| .. code-block:: | ||
|
|
||
| $ occ taskprocessing:task:get <task-id> | ||
|
|
||
| For example | ||
|
|
||
| .. code-block:: | ||
|
|
||
| $ occ taskprocessing:task:get --output=json_pretty 42 | ||
| { | ||
| "id": 1, | ||
| "type": "core:text2text:chat", | ||
| "lastUpdated": 1759739466, | ||
| "status": "STATUS_SUCCESSFUL", | ||
| "userId": "admin", | ||
| "appId": "assistant:chatty-llm", | ||
| "input": { | ||
| "system_prompt": "This is a conversation in a specific language between the user and you, Nextcloud Assistant. You are a kind, polite and helpful AI that helps the user to the best of its abilities. If you do not understand something, you will ask for clarification. Detect the language that the user is using. Make sure to use the same language in your response. Do not mention the language explicitly.", | ||
| "input": "What's the weather in Berlin today?", | ||
| "history": [] | ||
| }, | ||
| "output": { | ||
| "output": "I'm happy to help, but I'm a large language model, I don't have real-time access to current weather conditions. However, I can suggest checking a reliable weather website or app, such as AccuWeather or OpenWeatherMap, for the most up-to-date information on the weather in Karlsruhe today. Would you like me to help with anything else?" | ||
| }, | ||
| "customId": "chatty-llm:1", | ||
| "completionExpectedAt": 1759739513, | ||
| "progress": 1, | ||
| "scheduledAt": 1759739453, | ||
| "startedAt": 1759739455, | ||
| "endedAt": 1759739466, | ||
| "allowCleanup": true, | ||
| "error_message": null | ||
| } | ||
|
|
||
| Each task has the following fields: | ||
|
|
||
| * `id` The internal ID of the task, also referenced in user-facing error messages in case something goes wrong | ||
| * `type` The type of the task | ||
| * `status` The current status of the task (can be either `"STATUS_CANCELLED"`, `"STATUS_FAILED"`, `"STATUS_SUCCESSFUL"`, `"STATUS_SCHEDULED"`, `"STATUS_RUNNING"`, or `"STATUS_UNKNOWN"`) | ||
| * `userId` The Id of the user who requested the task | ||
| * `lastUpdated` When the task was last updated | ||
| * `scheduledAt` When the task was scheduled/created | ||
| * `startedAt` When the task was started to be processed by the set task processing provider | ||
| * `completionExpectedAt` When the system expects/expected the task to be finished | ||
| * `endedAt` When the task finished be it successfully or unsuccessfully | ||
| * `appid` The ID of the app that scheduled the task | ||
| * `input` The values that were part of the task input | ||
| * `output` The values that were part of the task output | ||
| * `error_message` The error message in case the task failed | ||
|
|
||
| List and filter tasks | ||
| --------------------- | ||
|
|
||
| .. code-block:: | ||
|
|
||
| $ occ taskprocessing:task:list [options] | ||
|
|
||
| -u, --userIdFilter[=USERIDFILTER] only get the tasks for one user ID | ||
| -t, --type[=TYPE] only get the tasks for one task type | ||
| --appId[=APPID] only get the tasks for one app ID | ||
| --customID[=CUSTOMID] only get the tasks for one custom ID | ||
| -s, --status[=STATUS] only get the tests that have a specific status | ||
| --scheduledAfter[=SCHEDULEDAFTER] only get the tasks that were scheduled after a specific date (Unix timestamp) | ||
| --endedBefore[=ENDEDBEFORE] only get the tasks that ended before a specific date (Unix timestamp) | ||
|
|
||
|
|
||
| For example | ||
|
|
||
| .. code-block:: | ||
|
|
||
| $ occ taskprocessing:task:list --output=json_pretty --status=3 --scheduledAfter=1759740266 --endedBefore=1759743900 | ||
| [ | ||
| { | ||
| ... | ||
| } | ||
| ] | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be 4 months
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nextcloud/server#55579