utils#

Functions

utils.async_gateway_error_handler(func)

Async decorator to catch ApiRequestFailure on Model Gateway calls and log a uniform warning.

utils.check_duplicate_chat_params(params, kwargs)

utils.check_for_attribute(value, key, env_key)

utils.convert_to_watsonx_tool(tool)

Convert WatsonxTool to watsonx tool structure.

utils.extract_chat_params(kwargs[, ...])

utils.extract_params(kwargs[, default_params])

utils.gateway_error_handler(func)

Decorator to catch ApiRequestFailure on Model Gateway calls and log a uniform warning.