UNPKG

rawi

Version:

Rawi (راوي) is the developer-friendly AI CLI that brings the power of 12 major AI providers directly to your terminal. With seamless shell integration, persistent conversations, and 200+ specialized prompt templates, Rawi transforms your command line into

4 lines 2.73 kB
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/* Rawi (راوي) is the developer-friendly AI CLI that brings the power of 12 major AI providers directly to your terminal. With seamless shell integration, persistent conversations, and 200+ specialized prompt templates, Rawi transforms your command line into an intelligent development workspace. */ var _lmstudio = require('@ai-sdk/lmstudio');var _ai = require('ai');var m=["deepseek/deepseek-r1-0528-qwen3-8b","google/gemma-3-1b","google/gemma-2-9b","google/gemma-3-12b","google/gemma-3-27b","google/gemma-3-4b","ibm/granite-3.1-8b","ibm/granite-3.2-8b","meta/llama-3.3-70b","microsoft/phi-4","microsoft/phi-4-mini-reasoning","microsoft/phi-4-reasoning-plus","mistralai/codestral-22b-v0.1","mistralai/devstral-small-2505","mistralai/magistral-small","mistralai/mathstral-7b-v0.1","mistralai/mistral-7b-instruct-v0.3","mistralai/mistral-nemo-instruct-2407","mistralai/mistral-small-3.2","qwen/qwen2.5-coder-14b","qwen/qwen2.5-coder-32b","qwen/qwen2.5-vl-7b","qwen/qwen3-1.7b","qwen/qwen3-4b","qwen/qwen3-8b","qwen/qwen3-14b","qwen/qwen3-235b-a22b","qwen/qwen3-30b-a3b","qwen/qwen3-32b","qwen/qwq-32b"],l= exports.a =m.map(e=>({name:e,displayName:e})),b= exports.b ={name:"lmstudio",displayName:"\u{1F7E3} LM Studio",models:l},p= exports.c =async(e,s)=>{try{let a=_optionalChain([e, 'access', _ => _.providerSettings, 'optionalAccess', _2 => _2.baseURL])||"http://localhost:1234/v1",r=_lmstudio.createOpenAICompatible.call(void 0, {baseURL:a,name:"lmstudio"}),o=_ai.streamText.call(void 0, {model:r.chatModel(e.model),prompt:s,temperature:e.temperature||.7,maxTokens:e.maxTokens||2048});return{textStream:o.textStream,fullResponse:o.text}}catch(t){throw new Error(`Error calling LM Studio streaming API: ${t instanceof Error?t.message:String(t)}`)}};exports.a = l; exports.b = b; exports.c = p; /* Rawi (راوي) is the developer-friendly AI CLI that brings the power of 12 major AI providers directly to your terminal. With seamless shell integration, persistent conversations, and 200+ specialized prompt templates, Rawi transforms your command line into an intelligent development workspace. */ //# sourceMappingURL=chunk-P47BPYQX.cjs.map