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 • 3.01 kB
JavaScript
/* 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{createAmazonBedrock as c}from"@ai-sdk/amazon-bedrock";import{streamText as m}from"ai";var l=["amazon.titan-tg1-large","amazon.titan-text-express-v1","anthropic.claude-v2","anthropic.claude-v2:1","anthropic.claude-instant-v1","anthropic.claude-sonnet-4-20250514-v1:0","anthropic.claude-opus-4-20250514-v1:0","anthropic.claude-3-7-sonnet-20250219-v1:0","anthropic.claude-3-5-sonnet-20240620-v1:0","anthropic.claude-3-5-sonnet-20241022-v2:0","anthropic.claude-3-5-haiku-20241022-v1:0","anthropic.claude-3-sonnet-20240229-v1:0","anthropic.claude-3-haiku-20240307-v1:0","anthropic.claude-3-opus-20240229-v1:0","cohere.command-text-v14","cohere.command-light-text-v14","cohere.command-r-v1:0","cohere.command-r-plus-v1:0","meta.llama3-70b-instruct-v1:0","meta.llama3-8b-instruct-v1:0","meta.llama3-1-405b-instruct-v1:0","meta.llama3-1-70b-instruct-v1:0","meta.llama3-1-8b-instruct-v1:0","meta.llama3-2-11b-instruct-v1:0","meta.llama3-2-1b-instruct-v1:0","meta.llama3-2-3b-instruct-v1:0","meta.llama3-2-90b-instruct-v1:0","mistral.mistral-7b-instruct-v0:2","mistral.mixtral-8x7b-instruct-v0:1","mistral.mistral-large-2402-v1:0","mistral.mistral-small-2402-v1:0","amazon.titan-text-express-v1","amazon.titan-text-lite-v1"],p=l.map(t=>({name:t,displayName:t})),k={name:"bedrock",displayName:"\u{1F7E0} Amazon Bedrock",models:p},h=async(t,i)=>{try{let e=t.providerSettings,o=e?.region||process.env.AWS_REGION||"us-east-1",a;if(e?.useProviderChain)try{let{fromNodeProviderChain:r}=await import("@aws-sdk/credential-providers");a=c({region:o,credentialProvider:r()})}catch{throw new Error("Failed to load AWS credential provider chain. Make sure you have installed @aws-sdk/credential-providers package: npm install @aws-sdk/credential-providers")}else{let r=e?.accessKeyId||process.env.AWS_ACCESS_KEY_ID,n=e?.secretAccessKey||process.env.AWS_SECRET_ACCESS_KEY,d=e?.sessionToken||process.env.AWS_SESSION_TOKEN;if(!r||!n)throw new Error("AWS access key ID and secret access key are required for Amazon Bedrock");a=c({region:o,accessKeyId:r,secretAccessKey:n,sessionToken:d})}let s=m({model:a(t.model),prompt:i,temperature:t.temperature||.7,maxTokens:t.maxTokens||2048});return{textStream:s.textStream,fullResponse:s.text}}catch(e){throw new Error(`Error calling Amazon Bedrock streaming API: ${e instanceof Error?e.message:String(e)}`)}};export{p as a,k as b,h 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-JD3A5OXF.js.map