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.95 kB
JavaScript
;Object.defineProperty(exports, "__esModule", {value: true});/* 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 _azure = require('@ai-sdk/azure');var _ai = require('ai');var m=[],d= exports.b ={name:"azure",displayName:"\u{1F537} Azure OpenAI",models:m},g= exports.c =async(e,t)=>{try{if(!e.apiKey)throw new Error("API key is required for Azure OpenAI");if(!e.providerSettings||!("resourceName"in e.providerSettings))throw new Error("Azure resource name is required");let r=e.providerSettings.resourceName,s="apiVersion"in e.providerSettings?e.providerSettings.apiVersion:"2024-10-01-preview",n=_azure.createAzure.call(void 0, {apiKey:e.apiKey,resourceName:r,apiVersion:s}),o=_ai.streamText.call(void 0, {model:n(e.model),prompt:t,temperature:e.temperature||.7,maxTokens:e.maxTokens||2048});return{textStream:o.textStream,fullResponse:o.text}}catch(r){throw r instanceof Error&&(r.message.includes("not found")||r.message.includes("does not exist")||r.message.includes("deployment"))?new Error(`Error calling Azure OpenAI streaming API: Deployment "${e.model}" not found. Make sure you've correctly entered your deployment name (not the model name like "gpt-4"). Original error: ${r.message}`):new Error(`Error calling Azure OpenAI streaming API: ${r instanceof Error?r.message:String(r)}`)}};exports.a = m; exports.b = d; exports.c = g;
/* 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-32YL5W65.cjs.map