FFAIClientBase
- class FFAIClientBase[source]
Bases:
ABCAbstract base class defining the contract for AI client implementations.
All AI provider clients (Mistral, Anthropic, OpenAI, etc.) must inherit from this class and implement its abstract methods.
- retry_config
Override retry configuration.
Noneuses the global config defaults.
- property last_usage: TokenUsage | None
Token usage from the most recent generate_response() call.
- property last_duration_ms: float | None
Wall-clock duration in ms of the most recent generate_response() call.
- add_tool_result(tool_call_id, content)[source]
Add a tool result to the conversation history.
Default implementation appends a tool-role message. Subclasses that manage conversation history differently (e.g. via an external API) should override this method.