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.24 kB
JavaScript
;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 _cerebras = require('@ai-sdk/cerebras');var _ai = require('ai');var p=["qwen-3-235b-a22b","qwen-3-32b","llama3.1-8b","llama-3.3-70b","deepseek-r1-distill-llama-70b","llama-4-scout-17b-16e-instruct"],b= exports.b =p.map(e=>({name:e,displayName:e})),l= exports.c ={name:"cerebras",displayName:"\u{1F9E0} Cerebras",models:b},y= exports.d =async(e,a)=>{try{let r=e.providerSettings,s=_optionalChain([r, 'optionalAccess', _ => _.apiKey])||e.apiKey;if(!s)throw new Error("API key is required for Cerebras");let o=_optionalChain([r, 'optionalAccess', _2 => _2.baseURL])||"https://api.cerebras.ai/v1",i=_cerebras.createCerebras.call(void 0, {apiKey:s,baseURL:o}),t=_ai.streamText.call(void 0, {model:i(e.model),prompt:a,temperature:e.temperature||.7,maxTokens:e.maxTokens||2048});return{textStream:t.textStream,fullResponse:t.text}}catch(r){throw new Error(`Error calling Cerebras streaming API: ${r instanceof Error?r.message:String(r)}`)}};exports.a = p; exports.b = b; exports.c = l; exports.d = y;
/* 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-KKPOH4UH.cjs.map