def validate_api_key_and_model(api_key: str, model: str) -> None:
    """
    Validate the API key and model name.

    Args:
        api_key (str): The API key to validate.
        model (str): The model name to validate.

    Raises:
        ValueError: If the API key or model name is invalid.

    """
    if not api_key:
        raise ValueError("Pipeshift API Key not found!")
    elif not isinstance(api_key, str) or len(api_key.strip()) == 0:
        raise ValueError("Invalid API key: API key must be a non-empty string.")

    if not model:
        raise ValueError("Model not specified. PLease enter model name")
    if not isinstance(model, str) or len(model.strip()) == 0:
        raise ValueError("Invalid model name: Model name must be a non-empty string.")

    Validate the API key and model name.

    Args:
        api_key (str): The API key to validate.
        model (str): The model name to validate.

    Raises:
        ValueError: If the API key or model name is invalid.

    
llama-index-integrations/llms/llama-index-llms-pipeshift/llama_index/llms/pipeshift/base.py