Skip to main content

PluginOptions

Properties

completion?

optional completion: object

The completion section is used to define the completion provider and its parameters.

expert?

optional expert: object

Expert settings

expert.debounceTime?

optional debounceTime: number

Time in ms to wait after user stops typing before sending request to completion provider. Default is 300 ms.

expert.maxTokens?

optional maxTokens: number

Number of tokens to generate. Default is 50. 1 token ~= ¾ words

expert.promptInputLimit?

optional promptInputLimit: number

Maximum number of last characters which will be used for completion for target field. Default is 500. Higher value will give better context but will cost more.

expert.recordContext?

optional recordContext: object

When completion is made, this plugin passes non-empty fields of the record to the LLM model for record context understanding.

expert.recordContext.maxFieldLength?

optional maxFieldLength: number

Limit of input field value. Default is 300. If field is longer, it will be truncated.

expert.recordContext.maxFields?

optional maxFields: number

Using this field you can limit number of fields passed to the model. Default is 5. Completion field is not included in this limit. Set to 0 to disable context passing at all. If count of fields exceeds this number, longest fields will be selected. If some of values will exceed maxFieldLength, it will be smartly truncated by splitting ito splitParts, taking their starting substring and joining back with '...'.

expert.recordContext.splitParts?

optional splitParts: number

How many parts to split field value if it exceeds maxFieldLength. Default is 5.

expert.stop?

optional stop: string[]

Stop completion on these characters. Default is ['.']

expert.temperature?

optional temperature: number

Temperature (0-1). Lower is more deterministic, higher is more unpredicted creative. Default is 0.7.

params

params: object

The params are the parameters that will be passed to the completion provider.

params.apiKey

apiKey: string

OpenAI API key. Go to https://platform.openai.com/, go to Dashboard -> API keys -> Create new secret key Paste value in your .env file OPENAI_API_KEY=your_key Set openAiApiKey: process.env.OPENAI_API_KEY to access it

params.model?

optional model: string

Model name. Go to https://platform.openai.com/docs/models, select model and copy name. Default is gpt-4o-mini. Use e.g. more expensive gpt-4o for more powerful model.

provider

provider: string

The provider is the name of the plugin that will be used to provide completions.


htmlFieldName

htmlFieldName: string

Field where plugin will auto-complete text. Should be string or text field.


toolbar?

optional toolbar: any[]

Quill toolbar setting, full toolbar:

[
['bold', 'italic', 'underline', 'strike'], // toggled buttons
['blockquote', 'code-block', 'link'],
// [ 'image', 'video', 'formula' ],

[{ 'header': 2 }, { 'header': 3 }], // custom button values
[{ 'list': 'ordered'}, { 'list': 'bullet' }, { 'list': 'check' }],
// [{ 'script': 'sub'}, { 'script': 'super' }], // superscript/subscript
// [{ 'indent': '-1'}, { 'indent': '+1' }], // outdent/indent
// [{ 'direction': 'rtl' }], // text direction
// [{ 'size': ['small', false, 'large', 'huge'] }], // custom dropdown
// [{ 'header': [1, 2, 3, 4, 5, 6, false] }],
// [{ 'color': [] }, { 'background': [] }], // dropdown with defaults from theme
// [{ 'font': [] }],
[{ 'align': [] }],

['clean']
]