toAnthropicJson method

String toAnthropicJson()

Convert to Anthropic format

Implementation

String toAnthropicJson() {
  return switch (this) {
    AutoToolChoice() => 'auto',
    AnyToolChoice() => 'any',
    NoneToolChoice() => 'none',
    SpecificToolChoice(toolName: final name) =>
      '{"type": "tool", "name": "$name"}',
  };
}