Skip to main content

Module client

Module client 

Source
Expand description

LlmClient trait — abstract LLM backend for agent use.

Implementations wrap GeminiClient / OpenAIClient existing methods. structured_call injects the schema into the system prompt for flexible parsing.

Traits§

LlmClient
Abstract LLM client for agent framework.

Functions§

synthesize_finish_if_empty
When a model responds with text content instead of tool calls, synthesize a “finish” tool call so the agent loop gets the answer. Call this in tools_call implementations after extracting tool calls.