Register

POST

Register a model config to a project.

If the project name provided does not exist, a new project will be created automatically.

If the model config is the first to be associated to the project, it will be set as the active model config.

Request

This endpoint expects an object.
modelstringRequired
The model instance used. E.g. text-davinci-002.
namestringOptional
A friendly display name for the model config. If not provided, a name will be generated.
descriptionstringOptional
A description of the model config.
providerenumOptional
The company providing the underlying model service.
max_tokensintegerOptionalDefaults to -1

The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt

temperaturedoubleOptionalDefaults to 1
What sampling temperature to use when making a generation. Higher values means the model will be more creative.
top_pdoubleOptionalDefaults to 1

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.

stopstring or list of stringsOptional
The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence.
presence_penaltydoubleOptionalDefaults to 0
Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far.
frequency_penaltydoubleOptionalDefaults to 0
Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far.
othermap from strings to anyOptional
Other parameter values to be passed to the provider call.
seedintegerOptional
If specified, model will make a best effort to sample deterministically, but it is not guaranteed.
response_formatobjectOptional

The format of the response. Only type json_object is currently supported for chat.

projectstringOptional
Unique project name. If it does not exist, a new project will be created.
project_idstringOptional
Unique project ID
prompt_templatestringOptional

Prompt template that will take your specified inputs to form your final request to the provider model. NB: Input variables within the prompt template should be specified with syntax: {{INPUT_NAME}}.

chat_templatelist of objectsOptional

Messages prepended to the list of messages sent to the provider. These messages that will take your specified inputs to form your final request to the provider model. NB: Input variables within the prompt template should be specified with syntax: {{INPUT_NAME}}.

endpointenumOptional
Allowed values: completechatedit
Which of the providers model endpoints to use. For example Complete or Edit.
toolslist of objectsOptional
Make tools available to OpenAIs chat model as functions.

Response

This endpoint returns an object
project_idstring

String ID of project the model config belongs to. Starts with pr_.

project_namestring
Name of the project the model config belongs to.
created_atdatetime
updated_atdatetime
last_useddatetime
configobject
num_datapointsintegerOptional
Number of datapoints associated with this project model config.
evaluation_aggregateslist of objectsOptional
Aggregates of evaluators for the model config.

Errors