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 1.62 kB
/* 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. */ import{createXai as n}from"@ai-sdk/xai";import{streamText as m}from"ai";var g=["grok-3","grok-3-latest","grok-3-fast","grok-3-fast-latest","grok-3-mini","grok-3-mini-latest","grok-3-mini-fast","grok-3-mini-fast-latest","grok-2-vision-1212","grok-2-vision","grok-2-vision-latest","grok-2-image-1212","grok-2-image","grok-2-image-latest","grok-2-1212","grok-2","grok-2-latest","grok-vision-beta","grok-beta"],p=g.map(e=>({name:e,displayName:e})),x={name:"xai",displayName:"\u{1F916} xAI (Grok)",models:p},l=async(e,s)=>{try{let o=e.providerSettings,t=o?.apiKey||e.apiKey;if(!t)throw new Error("API key is required for xAI");let i=o?.baseURL||"https://api.x.ai/v1",a=n({apiKey:t,baseURL:i}),r=m({model:a(e.model),prompt:s,temperature:e.temperature||.7,maxTokens:e.maxTokens||2048});return{textStream:r.textStream,fullResponse:r.text}}catch(o){throw new Error(`Error calling xAI streaming API: ${o instanceof Error?o.message:String(o)}`)}};export{p as a,x as b,l as c}; /* 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-OVWIJHCT.js.map