caikit.runtime.client.utils =========================== .. py:module:: caikit.runtime.client.utils .. autoapi-nested-parse:: Helper utils for GRPC and HTTP connections Functions --------- .. autoapisummary:: caikit.runtime.client.utils.construct_grpc_channel caikit.runtime.client.utils.construct_requests_session Module Contents --------------- .. py:function:: construct_grpc_channel(target: str, options: Optional[List[Tuple[str, str]]] = None, tls: Optional[caikit.interfaces.common.data_model.ConnectionTlsInfo] = None, retries: Optional[int] = None, retry_options: Optional[Dict[str, str]] = None) -> grpc.Channel Helper function to construct a grpc Channel with the given TLS config Args: target (str): The target hostname options (Optional[List[Tuple[str, str]]], optional): List of tuples representing GRPC options. Defaults to None. tls (Optional[ConnectionTlsInfo], optional): The TLS information for this channel. Defaults to None. retries (Optional[int], optional): The max number of retries to attempt. Defaults to None. retry_options (Optional[Dict[str, str]], optional): Dictionary to override fields in the GRPC retry service config. Defaults to None. Returns: grpc.Channel: The constructed channel .. py:function:: construct_requests_session(options: Optional[Dict[str, str]] = None, tls: Optional[caikit.interfaces.common.data_model.ConnectionTlsInfo] = None, timeout: Optional[int] = None, retries: Optional[int] = None, retry_options: Optional[Dict[str, str]] = None) -> requests.Session Helper function to construct a requests Session object with the given TLS config Args: options (Optional[Dict[str, str]], optional): Dictionary of request kwargs to pass to session creation. Defaults to None. tls (Optional[ConnectionTlsInfo], optional): The TLS information for this session. Defaults to None. retries (Optional[int], optional): The max number of retries to attempt. Defaults to None. retry_options (Optional[Dict[str, str]], optional): Dictionary to override kwargs passed to the Retry object construction Returns: Session: _description_