Script for easily configuring, using, switching and comparing local offline coding models
at main 33 lines 656 B view raw
1import { OLLAMA_PORT } from "../config.js"; 2 3export function piModelsConfig(modelId: string, modelName: string): string { 4 return JSON.stringify( 5 { 6 providers: { 7 ollama: { 8 baseUrl: `http://127.0.0.1:${OLLAMA_PORT}/v1`, 9 api: "openai-completions", 10 apiKey: "not-needed", 11 models: [ 12 { 13 id: modelId, 14 name: modelName, 15 }, 16 ], 17 }, 18 }, 19 }, 20 null, 21 2, 22 ) + "\n"; 23} 24 25export function piSettingsConfig(): string { 26 return JSON.stringify( 27 { 28 packages: ["@gordonb/pi-memory-blocks"], 29 }, 30 null, 31 2, 32 ) + "\n"; 33}