0.0.4 • Published 3 months ago

nanogpt-client v0.0.4

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

NanoGPT Client

An unofficial implementation of the NanoGPT API. This library aims to provide a Typescript client for both browser and node environments. It's built on the inferred OpenAPI spec.

Note: The API might change at any time which can render this client unusable, use at your own risk.

Install

npm install nanogpt-client

How to use

import { NanoGPTClient } from 'nanogpt-client'

const client = new NanoGPTClient(NANOGPT_API_KEY)

const { data, error } = await client.chat({
  body: {
    model: 'chatgpt-4o-latest',
    messages: [
      { role: 'system', content: 'initial system prompt' },
      { role: 'user', content: 'input from user' }
    ]
  }
})

Contributing

Please consult CONTRIBUTING for guidelines on contributing to this project.

0.0.4

3 months ago

0.0.3

3 months ago

0.0.2

3 months ago

0.0.1

3 months ago