Docs

ai

The ai module contains functions for working with local and remote AI models.

Supported Models

Models can be managed in Settings ▸ AI. See AI Models for details.

The following model names are supported:

Local

To use local models, you need to install the model files in Settings ▸ AI.

Remote

OpenAI

To use OpenAI models, you need to set the OpenAI API key in Settings ▸ Keys.

Google AI

To use Google AI models, you need to set the Google AI API key in Settings ▸ Keys.

OpenRouter

To use OpenRouter models, you need to set the OpenRouter API key in Settings ▸ Keys.

DeepSeek

To use DeepSeek models, you need to set the DeepSeek API key in Settings ▸ Keys.

TextSynth

To use TextSynth models, you need to set the TextSynth API key in Settings ▸ Keys.

Syntax

ai

Properties

Text completion

Tokenizing