Typedef

RequestParameters (ai/adapters)

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

typedefRecord<string, any> | ( string ) => Promise<Record<string, any>>

Additional configuration parameters for the AI request. Use it to customize how the AI service generates responses.

See the reference for the AI service of your choice to learn what parameters can be used with that service or model.

If the provided value is an object, it is passed to the request as provided.

If the provided value is a function, it should be a function that returns a Promise which resolves with the request parameters object. This gives you more flexibility to provide parameters for the AI model.

The function is passed actionId parameter to make it possible to further customize the parameters.

If the function fails for any reason, the promise should be rejected. In this case, the feature that made the request should display an error notification.

Filtering