Skip to content

[bug] the need to create a custom provider to set chat model options (or any model options) is a bug #74

@csells

Description

@csells
class ToolForcingGoogleProvider extends dartantic.GoogleProvider {
  ToolForcingGoogleProvider({required String apiKey}) : super(apiKey: apiKey);

  @override
  dartantic.ChatModel<dartantic.GoogleChatModelOptions> createChatModel({
    String? name,
    List<dartantic.Tool<Object>>? tools,
    double? temperature,
    bool enableThinking = false,
    dartantic.GoogleChatModelOptions? options,
  }) {
    assert(options == null);
    return super.createChatModel(
      name: name,
      tools: tools,
      temperature: temperature,
      enableThinking: enableThinking,
      options: dartantic.GoogleChatModelOptions(functionCallingMode: .any),
    );
  }
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions