4.24.0 • Published 1 year ago

martian-node v4.24.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year 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

1 year ago

4.22.0

2 years ago

4.19.0

2 years ago

4.19.1

2 years ago

4.19.2

2 years ago

4.19.3

2 years ago

4.19.8

2 years ago

4.19.9

2 years ago

4.19.4

2 years ago

4.19.6

2 years ago

4.19.7

2 years ago

4.20.0

2 years ago

4.21.0

2 years ago

4.20.1

2 years ago

1.0.0

2 years ago