# AIRequestParameters

typedef

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`](module_ai_aiassistant_adapters_aitextadapter-AITextAdapterRequestData.md#member-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.

#### Value

`Record<string, any> | ( actionId: string ) => Promise<Record<string, any>>`

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
