AITextAdapterRequestData
Properties
-
actionId : stringmodule:ai/aiassistant/adapters/aitextadapter~AITextAdapterRequestData#actionIdID of the performed action. This is a unique ID for each feature and each action that triggers the AI request.
The main role for
actionIdis 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
actionIdvalues like'aiAssistant:custom', or'aiAssistant:command:improveWriting'. -
context : stringmodule:ai/aiassistant/adapters/aitextadapter~AITextAdapterRequestData#contextThe 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.
-
module:ai/aiassistant/adapters/aitextadapter~AITextAdapterRequestData#onDataA 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 fireonData()with:'<p>T','<p>This is an', and'<p>This is an example</p>'. -
query : stringmodule:ai/aiassistant/adapters/aitextadapter~AITextAdapterRequestData#queryThe user's query.