Migrate from OpenAI

Migrate from OpenAI#

This document presents a guide for migrating from the OpenAI chat endpoint API to the MK1 Flywheel API. This guide will help you understand the differences between the two APIs and how to update your code to use the MK1 Flywheel API.

The table below shows the mapping between the supported OpenAI chat endpoint parameters and the MK1 Flywheel parameters.

OpenAI

MK1 Flywheel

Comments

messages

text

text takes a single string while messages takes a list of messages comprising the conversation so far.

max_tokens

max_tokens

(Unavailable)

eos_token_ids

OpenAI models have their EOS tokens defined internally. For MK1 Flywheel, you need to specify the correct EOS tokens for the model you are using.

n

num_samples

stop

stop

temperature

temperature

top_p

top_p

presence_penalty

presence_penalty

frequency_penalty

frequency_penalty