model decorator to associate a model identifier and configuration with an agent.
model
The model identifier string. List of model identifiers available at https://axar-ai.gitbook.io/axar/basics/model
Optional
Optional configuration for the model
A class decorator function.
// Basic usage@model('openai:gpt-4-mini')class MyAgent extends Agent<string, string> {}// With configuration@model('openai:gpt-4-mini', { maxTokens: 100, temperature: 0.5, maxRetries: 3, maxSteps: 3, toolChoice: 'auto'})class MyConfiguredAgent extends Agent<string, string> {} Copy
// Basic usage@model('openai:gpt-4-mini')class MyAgent extends Agent<string, string> {}// With configuration@model('openai:gpt-4-mini', { maxTokens: 100, temperature: 0.5, maxRetries: 3, maxSteps: 3, toolChoice: 'auto'})class MyConfiguredAgent extends Agent<string, string> {}
model
decorator to associate a model identifier and configuration with an agent.