Giter Club home page Giter Club logo

openai-schemas's Introduction

openai-schemas

npm version js-standard-style

This is a collection json schema objects for validating openai endpoints requests and responses. This library also contains tools for scraping new schemas from the official api docs on openai.com when they are updated.

Installation

To install the package, use the following command:

npm install openai-schemas

Usage

This package can be used in several ways to access the create function within the chat schema. Below are the methods to require or import this function:

Method 1

Using destructuring at the top level:

const { create } = require('openai-schemas').schemas.chat;
console.log(create);
Method 2

Destructuring one level deeper:

const { chat: { create } } = require('openai-schemas').schemas;
console.log(create);
Method 3

Destructuring with full path:

const { schemas: { chat: { create } } } = require('openai-schemas');
console.log(create);

Reference

Below is a table of available json schemas. To see a full list, see the schemas/ directory.

Endpoint Schema
assistants createAssistantFile
assistants createAssistant
assistants deleteAssistantFile
assistants deleteAssistant
assistants fileObject
assistants getAssistantFile
assistants getAssistant
assistants listAssistantFiles
assistants listAssistants
assistants modifyAssistant
assistants object
audio createSpeech
audio createTranscription
audio createTranslation
chat create
chat object
chat streaming
embeddings create
embeddings object
files create
files delete
files list
files object
files retrieveContents
files retrieve
fineTuning cancel
fineTuning create
fineTuning eventObject
fineTuning listEvents
fineTuning list
fineTuning object
fineTuning retrieve
images createEdit
images create
images createVariation
images object
messages createMessage
messages fileObject
messages getMessageFile
messages getMessage
messages listMessageFiles
messages listMessages
messages modifyMessage
messages object
models delete
models list
models object
models retrieve
moderations create
moderations object
runs cancelRun
runs createRun
runs createThreadAndRun
runs getRun
runs getRunStep
runs listRuns
runs listRunSteps
runs modifyRun
runs object
runs stepObject
runs submitToolOutputs
threads createThread
threads deleteThread
threads getThread
threads modifyThread
threads object

openai-schemas's People

Contributors

mirnes-cajlakovic avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.