Deletes an AI model and removes its record from the polar_ai._ai_models table. Built-in models whose names start with an underscore (_) cannot be deleted.
Syntax
boolean AI_DropModel(text model_id);Parameters
| Parameter | Description |
|---|---|
model_id | The name of the existing AI model to delete. |
Return values
| Return value | Description |
|---|---|
t | The model was deleted successfully. |
f | The deletion failed. |
Usage notes
Deleting a model also removes its corresponding record from the
polar_ai._ai_modelstable.Built-in models cannot be deleted. Built-in model names start with an underscore (
_), such as_dashscope/text_embedding/text_embedding_v2.
Example
SELECT polar_ai.AI_DropModel('my_text_embedding_model');