hadadrjt's picture
SearchGPT: Initial stable release (RS1).
4359d28
raw
history blame contribute delete
393 Bytes
#
# SPDX-FileCopyrightText: Hadad <hadad@linuxmail.org>
# SPDX-License-Identifier: Apache-2.0
#
import json
def tools_parser(raw_parameters):
try:
parsed_params = json.loads(raw_parameters or "{}")
parsed_params["engine"] = "google"
return parsed_params, None
except Exception as parse_error:
return None, f"Invalid tool arguments: {str(parse_error)}"