4.24.0 • Published 5 months ago

martian-node v4.24.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 months ago

Martian Node API library

The Martin Node library is a drop in replacement for OpenAI package

Documentation

The API documentation can be found here.

Installation

npm i martian-node

Usage

import OpenAI from 'martian-node';

const openai = new OpenAI({
  apiKey: 'My Martian API Key', // defaults to process.env["MARTIAN_API_KEY"]
});

async function main() {
  const chatCompletion = await openai.chat.completions.create({
    messages: [{ role: 'user', content: 'Say this is a test' }],
    model: 'router',
    // If more than one model is specified, the router chooses the best among them
    // model: ['gpt-3.5-turbo', 'claude-v1'],
  });
}

main();
4.24.0

5 months ago

4.22.0

5 months ago

4.19.0

6 months ago

4.19.1

6 months ago

4.19.2

6 months ago

4.19.3

6 months ago

4.19.8

6 months ago

4.19.9

6 months ago

4.19.4

6 months ago

4.19.6

6 months ago

4.19.7

6 months ago

4.20.0

5 months ago

4.21.0

5 months ago

4.20.1

5 months ago

1.0.0

10 months ago