toJson method
Convert tool to JSON format for API requests
Implementation
@override
Map<String, dynamic> toJson() {
final json = <String, dynamic>{'type': 'file_search'};
if (vectorStoreIds != null && vectorStoreIds!.isNotEmpty) {
json['vector_store_ids'] = vectorStoreIds;
}
if (parameters != null) {
json.addAll(parameters!);
}
return json;
}