Agents 1.6.9
Edge AI Agents SDK
Loading...
Searching...
No Matches
agents::LLMOptions Struct Reference

Options for LLM API calls. More...

#include <llm_interface.h>

Public Attributes

double temperature = 0.7
 The temperature of the LLM.
int max_tokens = 1024
 The maximum number of tokens.
double top_p = 1.0
 The top p of the LLM.
double presence_penalty = 0.0
 The presence penalty of the LLM.
double frequency_penalty = 0.0
 The frequency penalty of the LLM.
int timeout_ms = 30000
 The timeout in milliseconds.
std::vector< std::string > stop_sequences
 The stop sequences of the LLM.
std::optional< JsonObjectresponse_schema
 Response schema for structured output (JSON schema).
std::optional< std::string > response_mime_type
 Response MIME type for structured output.
std::optional< std::string > reasoning_effort
 Reasoning effort for thinking-capable models.

Detailed Description

Member Data Documentation

◆ reasoning_effort

std::optional<std::string> agents::LLMOptions::reasoning_effort

Reasoning effort for thinking-capable models.

Accepted values: "low", "medium", "high". Mapped per provider:

  • Ollama (gpt-oss): sets think to the level string (Reasoning: low|medium|high in template).
  • OpenAI (o1/o3/o4-mini/gpt-5): sets reasoning_effort API field.
  • Anthropic (Claude 4.x with extended thinking): sets thinking.budget_tokens using a level→budget mapping (low=1024, medium=4096, high=16384).
  • Google (Gemini): no equivalent yet; ignored.

If unset (nullopt): Ollama defaults to think: true (model default level + channel split); other providers don't send any reasoning param.

◆ response_mime_type

std::optional<std::string> agents::LLMOptions::response_mime_type

Response MIME type for structured output.

Note
Use "application/json" for JSON output, "text/x.enum" for enum output