asRetrieveAndGenerateConfig
Casts this KnowledgeBaseConfig as a RetrieveAndGenerateConfig and retrieves its aws.sdk.kotlin.services.bedrock.model.RetrieveAndGenerateConfiguration value. Throws an exception if the KnowledgeBaseConfig is not a RetrieveAndGenerateConfig.