def from_model_name(
        cls,
        access_key: str,
        secret_key: str,
        model_name: str,
        context_window: int,
    ):
        """
        Initialize a Qianfan LLM instance. Then query more parameters based on the model name.

        :param access_key: The Access Key obtained from the Security Authentication Center
            of Baidu Intelligent Cloud Console.
        :param secret_key: The Secret Key paired with the Access Key.
        :param model_name: The name of the model service. For example: ERNIE-4.0-8K.
        :param context_windows: The context window size. for example: 8192.
        """
        service_list = get_service_list(access_key, secret_key, ["chat"])
        try:
            service = next(
                service for service in service_list if service.name == model_name
            )
        except StopIteration:
            raise NameError(f"not found {model_name}")

        return cls(
            access_key=access_key,
            secret_key=secret_key,
            model_name=model_name,
            endpoint_url=service.url,
            context_window=context_window,
            llm_type=service.api_type,
        )

        Initialize a Qianfan LLM instance. Then query more parameters based on the model name.

        :param access_key: The Access Key obtained from the Security Authentication Center
            of Baidu Intelligent Cloud Console.
        :param secret_key: The Secret Key paired with the Access Key.
        :param model_name: The name of the model service. For example: ERNIE-4.0-8K.
        :param context_windows: The context window size. for example: 8192.
        
llama-index-integrations/llms/llama-index-llms-qianfan/llama_index/llms/qianfan/base.py