/modelSelect

Given an array of messages and the selection of LLMs you want to route between, /hashModelSelect will return a label for which LLM you should call.

Body Params
messages
array of objects
required

The messages array in OpenAI format.

messages*
llm_providers
array of objects
required

A list of LLM providers you want to route between.

llm_providers*
tools
array of objects

A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.

tools
int32

The maximum depth considered in the ranked LLM providers list.

string

Additional routing tradeoffs. Valid values are "cost" and "latency".

string

The preference ID created on the Not Diamond dashboard. Setting this value will change the ranking algorithm based on the preferences set.

boolean
Defaults to false

Whether to hash the content of messages.

Responses

Language
LoadingLoading…
Response
Choose an example:
application/json