Typedef

AITextAdapterRequestData (ai/adapters)

@ckeditor/ckeditor5-ai/src/adapters/aitextadapter

typedefobject

Filtering

Properties

  • actionId : string

    ID of the performed action. This is a unique ID for each feature and each action that triggers the AI request.

    The main role for actionId is to distinguish which feature made the call. The action ID can be used in extended and custom adapters to customize the request.

    Each AI feature describes what action IDs it creates and uses. For example, the AI Assistant feature uses actionId values like 'aiAssistant:custom', or 'aiAssistant:command:improveWriting'.

  • context : string

    The context on which the query is used.

    May be empty. In such case, it is assumed that the user wanted to create new textual content.

  • onData : AITextAdapterDataCallback

    A callback that is called whenever the data received by the adapter is updated.

    If the adapter does not use streaming, and receives the whole answer at once, it should call onData() once, when the data is received.

    If the adapter uses streaming, the adapter should internally build the whole received data and fire onData() callback with the full update data each time. For example, if during streaming, the adapter receives following chunks: '<p>T', 'his is an', and ' example</p>', then it should fire onData() with: '<p>T', '<p>This is an', and '<p>This is an example</p>'.

  • query : string

    The user's query.