Skip to content

Model

Model for defining the structure and behavior of AI agents. This model includes properties for specifying the model’s provider, connection details, and various options. It allows for flexible configuration of AI models to suit different use cases and requirements.

---
title: Model
config:
  look: handDrawn
  theme: colorful
  class:
    hideEmptyMembersBox: true
---
classDiagram
    class Model {
      
        +string id
        +string provider
        +string apiType
        +Connection connection
        +ModelOptions options
    }
    class Connection {
        +string kind
        +string authenticationMode
        +string usageDescription
    }
    Model *-- Connection
    class ModelOptions {
        +float32 frequencyPenalty
        +int32 maxOutputTokens
        +float32 presencePenalty
        +int32 seed
        +float32 temperature
        +int32 topK
        +float32 topP
        +string[] stopSequences
        +boolean allowMultipleToolCalls
        +dictionary additionalProperties
    }
    Model *-- ModelOptions
id: gpt-35-turbo
provider: azure
apiType: chat
connection:
kind: key
endpoint: https://{your-custom-endpoint}.openai.azure.com/
key: "{your-api-key}"
options:
type: chat
temperature: 0.7
maxTokens: 1000
NameTypeDescription
idstringThe unique identifier of the model - can be used as the single property shorthand
providerstringThe provider of the model (e.g., ‘openai’, ‘azure’, ‘anthropic’)
apiTypestringThe type of API to use for the model (e.g., ‘chat’, ‘response’, etc.)
connectionConnectionThe connection configuration for the model (Related Types: ReferenceConnection, RemoteConnection, ApiKeyConnection, AnonymousConnection)
optionsModelOptionsAdditional options for the model

The following types are composed within Model:

The following alternate constructions are available for Model. These allow for simplified creation of instances using a single property.

Simple construction with just an id

The following simplified representation can be used:

model: "example"

This is equivalent to the full representation:

model:
id: "example"