0.13.0 • Published 6 months ago
@skorpland/mishikaai v0.13.0
Usage
npm install mishikallmimport { completion } from 'mishikallm';
process.env['MISHIKAAI_API_KEY'] = 'your-mishikaai-key';
const response = await completion({
model: 'gpt-3.5-turbo',
messages: [{ content: 'Hello, how are you?', role: 'user' }],
});
// or stream the results
const stream = await completion({
model: "gpt-3.5-turbo",
messages: [{ content: "Hello, how are you?", role: "user" }],
stream: true
});
for await (const part of stream) {
process.stdout.write(part.choices[0]?.delta?.content || "");
}Features
We are working to support more and more AI models.
- Standardised completions
- Standardised embeddings
- Standardised input params 🚧 - List is here
- Caching ❌
- Proxy ❌
Supported Providers
| Provider | Completion | Streaming | Embedding |
|---|---|---|---|
| openai | ✅ | ✅ | ✅ |
| cohere | ✅ | ✅ | ❌ |
| anthropic | ✅ | ✅ | ❌ |
| ollama | ✅ | ✅ | ✅ |
| ai21 | ✅ | ✅ | ❌ |
| replicate | ✅ | ✅ | ❌ |
| deepinfra | ✅ | ✅ | ❌ |
| mistral | ✅ | ✅ | ✅ |
| huggingface | ❌ | ❌ | ❌ |
| together_ai | ❌ | ❌ | ❌ |
| openrouter | ❌ | ❌ | ❌ |
| vertex_ai | ❌ | ❌ | ❌ |
| palm | ❌ | ❌ | ❌ |
| baseten | ❌ | ❌ | ❌ |
| azure | ❌ | ❌ | ❌ |
| sagemaker | ❌ | ❌ | ❌ |
| bedrock | ❌ | ❌ | ❌ |
| vllm | ❌ | ❌ | ❌ |
| nlp_cloud | ❌ | ❌ | ❌ |
| aleph alpha | ❌ | ❌ | ❌ |
| petals | ❌ | ❌ | ❌ |
Development
Clone the repo
git clone https://github.com/skorpland/mishikai.gitInstall dependencies
npm installRun unit tests
npm tRun E2E tests
First copy the example env file.
cp .example.env .envThen fill the variables with your API keys to be able to run the E2E tests.
MISHIKAAI_API_KEY=<Your Mishika AI Api key>
....Then run the command below to run the tests
npm run test:e2e