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.
Class Diagram
Section titled “Class Diagram”---
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
Yaml Example
Section titled “Yaml Example”id: gpt-35-turboprovider: azureapiType: chatconnection: kind: key endpoint: https://{your-custom-endpoint}.openai.azure.com/ key: "{your-api-key}"options: type: chat temperature: 0.7 maxTokens: 1000Properties
Section titled “Properties”| Name | Type | Description |
|---|---|---|
| id | string | The unique identifier of the model - can be used as the single property shorthand |
| provider | string | The provider of the model (e.g., ‘openai’, ‘azure’, ‘anthropic’) |
| apiType | string | The type of API to use for the model (e.g., ‘chat’, ‘response’, etc.) |
| connection | Connection | The connection configuration for the model (Related Types: ReferenceConnection, RemoteConnection, ApiKeyConnection, AnonymousConnection) |
| options | ModelOptions | Additional options for the model |
Composed Types
Section titled “Composed Types”The following types are composed within Model:
Alternate Constructions
Section titled “Alternate Constructions”The following alternate constructions are available for Model.
These allow for simplified creation of instances using a single property.
string model
Section titled “string model”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"