use script to generate raycast ai providers yaml
1 file changed, 21 insertions(+), 0 deletions(-)
changed files
A bin/update-raycast-ai-providers
@@ -0,0 +1,21 @@ +#!/usr/bin/env fish +set --local lms_base_url http://localhost:28100 +set --local lms_models_path /api/v0/models +set --local lms_openai_path /v1/ + +xh $lms_base_url$lms_models_path | fx .data '?.type != "embeddings"' 'map(m => ({ + id: m.id, name: m.id, context: m.max_context_length, + abilities: { + tools: { supported: m.capabilities?.includes("tool_use") || false }, + temperature: { supported: true }, + system_message: { supported: true }, + vision: { supported: m.type == "vlm" }, + } +}))' "x => ({ + providers: [{ + id: 'lm-studio', + name: 'LM Studio', + base_url: '$lms_base_url$lms_openai_path', + models: x + }] +})" YAML.stringify >~/.config/raycast/ai/providers.yaml