Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/composer/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@
'OCP\\ContextChat\\Events\\ContentProviderRegisterEvent' => $baseDir . '/lib/public/ContextChat/Events/ContentProviderRegisterEvent.php',
'OCP\\ContextChat\\IContentManager' => $baseDir . '/lib/public/ContextChat/IContentManager.php',
'OCP\\ContextChat\\IContentProvider' => $baseDir . '/lib/public/ContextChat/IContentProvider.php',
'OCP\\ContextChat\\IContentProviderWithSearchTask' => $baseDir . '/lib/public/ContextChat/IContentProviderWithSearchTask.php',
'OCP\\ContextChat\\Type\\UpdateAccessOp' => $baseDir . '/lib/public/ContextChat/Type/UpdateAccessOp.php',
'OCP\\DB\\Events\\AddMissingColumnsEvent' => $baseDir . '/lib/public/DB/Events/AddMissingColumnsEvent.php',
'OCP\\DB\\Events\\AddMissingIndicesEvent' => $baseDir . '/lib/public/DB/Events/AddMissingIndicesEvent.php',
Expand Down
1 change: 1 addition & 0 deletions lib/composer/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
'OCP\\ContextChat\\Events\\ContentProviderRegisterEvent' => __DIR__ . '/../../..' . '/lib/public/ContextChat/Events/ContentProviderRegisterEvent.php',
'OCP\\ContextChat\\IContentManager' => __DIR__ . '/../../..' . '/lib/public/ContextChat/IContentManager.php',
'OCP\\ContextChat\\IContentProvider' => __DIR__ . '/../../..' . '/lib/public/ContextChat/IContentProvider.php',
'OCP\\ContextChat\\IContentProviderWithSearchTask' => __DIR__ . '/../../..' . '/lib/public/ContextChat/IContentProviderWithSearchTask.php',
'OCP\\ContextChat\\Type\\UpdateAccessOp' => __DIR__ . '/../../..' . '/lib/public/ContextChat/Type/UpdateAccessOp.php',
'OCP\\DB\\Events\\AddMissingColumnsEvent' => __DIR__ . '/../../..' . '/lib/public/DB/Events/AddMissingColumnsEvent.php',
'OCP\\DB\\Events\\AddMissingIndicesEvent' => __DIR__ . '/../../..' . '/lib/public/DB/Events/AddMissingIndicesEvent.php',
Expand Down
54 changes: 54 additions & 0 deletions lib/public/ContextChat/IContentProviderWithSearchTask.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php

declare(strict_types=1);

/**
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCP\ContextChat;

/**
* This interface defines methods to implement a Context Chat content provider
* with a search task and data description.
* @since 35.0.0
*/
interface IContentProviderWithSearchTask extends IContentProvider {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing a [#Consumable] or/and [#Implementable] attribute for new class or interface in OCP

/**
* A short description about the kind of data provided by this provider.
* This part is sent to the main model to make sense of the retrieved documents.
*
* Some examples can be:
* - "Email messages from the user's mailbox with sender, recipients, subject,
* and date."
* - "Chat messages from group and private conversations, each prefixed with
* author and timestamp. They are short and may be informal, and often only
* make sense in sequence.
*
* Return an empty string to keep it empty.
*
* @return string

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @return string
* @return non-empty-string

I suppose

* @since 35.0.0
*/
public function getDataDescription(): string;

/**
* A short (10-25 words) search task to be performed by context chat for the
* content provider.
* This is not shown to the user, only passed to the embedding model if the model
* is set to https://huggingface.co/intfloat/multilingual-e5-large-instruct
*
* Some examples can be:
* - "Given a question, retrieve email messages whose subject or body discusses
* or answers it, including quoted replies inside threads."
* - "Given a question, retrieve chat messages that mention or answer it,
* even when written informally or as short fragments."
*
* Return an empty string to use the generic default.
*
* @return string

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @return string
* @return non-empty-string

* @since 35.0.0
*/
public function getSearchTaskDescription(): string;
}
Loading