Search documentation of phoenix_kit

# PhoenixKit.Migrations.Postgres.V38 (phoenix_kit v1.7.87)

Copy Markdown View Source

PhoenixKit V38 Migration: AI Prompts System

This migration adds reusable prompt templates with variable substitution to the AI module.

## Changes

### Prompts Table (phoenix_kit_ai_prompts)

- Reusable text templates for AI interactions
- Variable substitution with {{VariableName}} syntax
- Auto-extracted variables stored for validation
- Usage tracking (count and last used timestamp)
- Sorting and organization support

## Key Features

- Variable Substitution: Use {{VarName}} placeholders in prompts
- Auto-extraction: Variables are automatically parsed from content
- Usage Tracking: Track how often prompts are used
- Flexible Templates: Can be used as system prompts, user prompts, or any text

## Summary

### Functions

down(opts)

Rollback the V38 migration.

up(opts)

Run the V38 migration to add AI Prompts.

## Functions

# down(opts)

Rollback the V38 migration.

# up(opts)

Run the V38 migration to add AI Prompts.