feat(ai): switch AI compose to the Ornith 9B model
Point the AI compose plugin at Unsloth Studio serving Ornith 1.0 9B (replacing Gemma 4 26B), and rename the model settings to ornith-9b-settings. Ornith is a reasoning model, so requests disable reasoning (reasoning_effort "none") to stop a small token budget being spent entirely on the reasoning block. Adds the migration and documents UNSLOTH_URL / UNSLOTH_API_KEY in .env.example.
This commit is contained in:
parent
d4f9051b17
commit
a06060eb9f
3 changed files with 42 additions and 0 deletions
|
|
@ -22,6 +22,15 @@ APP_URL=http://localhost:3000
|
|||
# Coolify (or to your cron). See DEPLOYMENT.md.
|
||||
GAME_TICK_NOTIFY_SECRET=YOUR_GAME_TICK_NOTIFY_SECRET
|
||||
|
||||
# --- Unsloth AI (Payload AI Compose plugin) ---
|
||||
# Base URL of the Unsloth Studio OpenAI-compatible API that serves the
|
||||
# Ornith 9B model (the "Apex" connection lives on the apex-lnx machine).
|
||||
# Defaults to the Apex box's LAN address; for the deployed site use whatever
|
||||
# host can actually reach that box (VPN / tunnel / reverse proxy).
|
||||
UNSLOTH_URL=http://192.168.1.7:8888/v1
|
||||
# sk-unsloth-... API key generated in Unsloth Studio (Settings -> API).
|
||||
UNSLOTH_API_KEY=YOUR_UNSLOTH_API_KEY
|
||||
|
||||
# --- Bin script file logging ---
|
||||
# Optional. Payload bin scripts (game-tick, market-tick, mission-tick,
|
||||
# generate-mission) tee their logs to daily files. Defaults to <repo>/logs
|
||||
|
|
|
|||
|
|
@ -88,6 +88,16 @@ export const GameRules: GlobalConfig = {
|
|||
"Assignment(s) considered the intelligence division. Members and leaders of these assignments get elevated access to draft missions and intelligence content.",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "infantryAssignment",
|
||||
type: "relationship",
|
||||
relationTo: "assignments",
|
||||
hasMany: false,
|
||||
admin: {
|
||||
description:
|
||||
"Assignment that members are moved to when a division leader removes them from their division (the default destination for leadership-initiated transfers).",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "proximityThreshold",
|
||||
type: "number",
|
||||
|
|
|
|||
23
src/migrations/20261003_060154_change_ai_model_to_ornith.ts
Normal file
23
src/migrations/20261003_060154_change_ai_model_to_ornith.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import { MigrateUpArgs, MigrateDownArgs, sql } from "@payloadcms/db-postgres";
|
||||
|
||||
export async function up({ db, payload, req }: MigrateUpArgs): Promise<void> {
|
||||
await db.execute(sql`
|
||||
ALTER TABLE "plugin_ai_instructions" RENAME COLUMN "gemma_4_settings_model" TO "ornith_9b_settings_model";
|
||||
ALTER TABLE "plugin_ai_instructions" ALTER COLUMN "ornith_9b_settings_model" SET DEFAULT 'unsloth/Ornith-1.0-9B-GGUF';
|
||||
UPDATE "plugin_ai_instructions" SET "ornith_9b_settings_model" = 'unsloth/Ornith-1.0-9B-GGUF' WHERE "ornith_9b_settings_model" IS DISTINCT FROM 'unsloth/Ornith-1.0-9B-GGUF';
|
||||
ALTER TABLE "plugin_ai_instructions" ALTER COLUMN "model_id" SET DATA TYPE text;
|
||||
DROP TYPE "public"."enum_plugin_ai_instructions_model_id";
|
||||
CREATE TYPE "public"."enum_plugin_ai_instructions_model_id" AS ENUM('unsloth/Ornith-1.0-9B-GGUF');
|
||||
ALTER TABLE "plugin_ai_instructions" ALTER COLUMN "model_id" SET DATA TYPE "public"."enum_plugin_ai_instructions_model_id" USING CASE WHEN "model_id" IS NULL THEN NULL ELSE 'unsloth/Ornith-1.0-9B-GGUF' END::"public"."enum_plugin_ai_instructions_model_id";`);
|
||||
}
|
||||
|
||||
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
|
||||
await db.execute(sql`
|
||||
ALTER TABLE "plugin_ai_instructions" ALTER COLUMN "model_id" SET DATA TYPE text;
|
||||
DROP TYPE "public"."enum_plugin_ai_instructions_model_id";
|
||||
CREATE TYPE "public"."enum_plugin_ai_instructions_model_id" AS ENUM('unsloth/gemma-4-26B-A4B-it-qat-GGUF');
|
||||
ALTER TABLE "plugin_ai_instructions" ALTER COLUMN "model_id" SET DATA TYPE "public"."enum_plugin_ai_instructions_model_id" USING CASE WHEN "model_id" IS NULL THEN NULL ELSE 'unsloth/gemma-4-26B-A4B-it-qat-GGUF' END::"public"."enum_plugin_ai_instructions_model_id";
|
||||
UPDATE "plugin_ai_instructions" SET "ornith_9b_settings_model" = 'unsloth/gemma-4-26B-A4B-it-qat-GGUF' WHERE "ornith_9b_settings_model" IS DISTINCT FROM 'unsloth/gemma-4-26B-A4B-it-qat-GGUF';
|
||||
ALTER TABLE "plugin_ai_instructions" ALTER COLUMN "ornith_9b_settings_model" SET DEFAULT 'unsloth/gemma-4-26B-A4B-it-qat-GGUF';
|
||||
ALTER TABLE "plugin_ai_instructions" RENAME COLUMN "ornith_9b_settings_model" TO "gemma_4_settings_model";`);
|
||||
}
|
||||
Loading…
Reference in a new issue