OpenAIModelDto

@Serializable
data class OpenAIModelDto(var model: String = "", var modelType: OpenAIModelType = OpenAIModelType.UNSPECIFIED, var customModel: String = "", var temperature: Double = -1.0, var maxTokens: Int = -1, var emotionRecognitionEnabled: Boolean? = null, var numFastTurns: Int = -1, var knowledgeBaseDto: KnowledgeBaseDto? = null, val messages: MutableList<RoleMessageDto> = mutableListOf(), val tools: MutableList<ToolDto> = mutableListOf(), val toolIds: MutableSet<String> = mutableSetOf(), val functions: MutableList<FunctionDto> = mutableListOf(), var fallbackModels: MutableList<String> = mutableListOf(), val fallbackModelTypes: MutableList<OpenAIModelType> = mutableListOf(), val customFallbackModels: MutableList<String> = mutableListOf(), var semanticCachingEnabled: Boolean? = null) : OpenAIModelProperties, CommonModelDto(source)

Constructors

Link copied to clipboard
constructor(model: String = "", modelType: OpenAIModelType = OpenAIModelType.UNSPECIFIED, customModel: String = "", temperature: Double = -1.0, maxTokens: Int = -1, emotionRecognitionEnabled: Boolean? = null, numFastTurns: Int = -1, knowledgeBaseDto: KnowledgeBaseDto? = null, messages: MutableList<RoleMessageDto> = mutableListOf(), tools: MutableList<ToolDto> = mutableListOf(), toolIds: MutableSet<String> = mutableSetOf(), functions: MutableList<FunctionDto> = mutableListOf(), fallbackModels: MutableList<String> = mutableListOf(), fallbackModelTypes: MutableList<OpenAIModelType> = mutableListOf(), customFallbackModels: MutableList<String> = mutableListOf(), semanticCachingEnabled: Boolean? = null)

Properties

Link copied to clipboard
@Transient
open override val customFallbackModels: MutableList<String>

This enables specifying a fallback model that doesn't already exist as an OpenAIModelType enum.

Link copied to clipboard
@Transient
open override var customModel: String

This enables specifying a model that doesn't already exist as an OpenAIModelType enum.

Link copied to clipboard

This determines whether we detect user's emotion while they speak and send it as an additional info to model. Default false because the model is usually good at understanding the user's emotion from text.

Link copied to clipboard
Link copied to clipboard
@Transient
open override val fallbackModelTypes: MutableList<OpenAIModelType>

These are the fallback models that will be used if the primary model fails. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest fallbacks that make sense.

Link copied to clipboard
open override val functions: MutableList<FunctionDto>
Link copied to clipboard
@SerialName(value = "knowledgeBase")
open override var knowledgeBaseDto: KnowledgeBaseDto?
Link copied to clipboard
open override var maxTokens: Int

This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.

Link copied to clipboard
open override val messages: MutableList<RoleMessageDto>
Link copied to clipboard
Link copied to clipboard
@Transient
open override var modelType: OpenAIModelType

This is the name of the model.

Link copied to clipboard
open override var numFastTurns: Int

This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai. Default is 0.

Link copied to clipboard
@EncodeDefault
open override val provider: ModelType
Link copied to clipboard
open override var semanticCachingEnabled: Boolean?
Link copied to clipboard
open override var temperature: Double

This is the temperature that will be used for calls.

Link copied to clipboard
open override val toolIds: MutableSet<String>

These are the tools that the assistant can use during the call. To use transient tools, use tools. Both tools and toolIds can be used together.

Link copied to clipboard
open override val tools: MutableList<ToolDto>

Functions

Link copied to clipboard
Link copied to clipboard