from llama_index.embeddings import AzureOpenAIEmbedding # You need to deploy your own embedding model as well as your own chat completion model embed_model = AzureOpenAIEmbedding( model="text-embedding-ada-002", deployment_name="text-embedding-ada-002-2", api_key='...', azure_endpoint='...', api_version="2", ) embed_model.get_text_embedding( "It is raining cats and dogs here!" ) When I try to run it, the following error occurs. NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}
api_key = "<api-key>" azure_endpoint = "https://<your-resource-name>.openai.azure.com/" api_version = "2023-07-01-preview" embed_model = AzureOpenAIEmbedding( model="text-embedding-ada-002", deployment_name="my-custom-embedding", api_key=api_key, azure_endpoint=azure_endpoint, api_version=api_version, )