Nextcloud PHP API (master)

IContentProviderWithSearchTask extends IContentProvider

This interface defines methods to implement a Context Chat content provider with a search task and data description.

Tags
since
35.0.0

Table of Contents

Methods

getAppId()  : string
The ID of the app making the provider avaialble
getDataDescription()  : string
A short description about the kind of data provided by this provider.
getId()  : string
The ID of the provider
getItemUrl()  : string
The absolute URL to the content item
getSearchTaskDescription()  : string
A short (10-25 words) search task to be performed by context chat for the content provider.
triggerInitialImport()  : void
Starts the initial import of content items into context chat

Methods

getAppId()

The ID of the app making the provider avaialble

public getAppId() : string
Tags
since
32.0.0
Return values
string

getDataDescription()

A short description about the kind of data provided by this provider.

public getDataDescription() : string

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.

Tags
since
35.0.0
Return values
string

getId()

The ID of the provider

public getId() : string
Tags
since
32.0.0
Return values
string

getItemUrl()

The absolute URL to the content item

public getItemUrl(string $id) : string
Parameters
$id : string
Tags
since
32.0.0
Return values
string

getSearchTaskDescription()

A short (10-25 words) search task to be performed by context chat for the content provider.

public getSearchTaskDescription() : string

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.

Tags
since
35.0.0
Return values
string

triggerInitialImport()

Starts the initial import of content items into context chat

public triggerInitialImport() : void
Tags
since
32.0.0
On this page

Search results