tooluniverse.utils module¶
- tooluniverse.utils.compare_function_calls(pred_function_call, gt_function_call, compare_arguments=True, compare_value=True)[source]¶
- tooluniverse.utils.extract_function_call_json(lst, return_message=False, verbose=True, format='llama')[source]¶
- tooluniverse.utils.format_api_response(response_data: Any, format_type: str = 'json') str | Dict[str, Any] | List[Any] [source]¶
Format API response data into a standardized format.
- tooluniverse.utils.normalize_gene_symbol(gene_symbol: str) str [source]¶
Normalize a gene symbol to standard format.
- tooluniverse.utils.read_json_list(file_path)[source]¶
Reads a list of JSON objects from a file.
Parameters: file_path (str): The path to the JSON file.
Returns: list: A list of dictionaries containing the JSON objects.
- tooluniverse.utils.validate_hook_conditions(conditions: Dict[str, Any]) bool [source]¶
Validate hook trigger conditions.
This function checks that the hook conditions are properly structured and contain valid operators and thresholds.
- tooluniverse.utils.validate_hook_config(config: Dict[str, Any]) bool [source]¶
Validate hook configuration for correctness and completeness.
This function checks that the hook configuration contains all required fields and that the structure is valid for the hook system.