skip to Main Content

Encountered keyerror when run LangChain program with Azure API

I encountered error when I run below codes (extracted from https://python.langchain.com/docs/tutorials/llm_chain/#using-language-models) in Jupyter Notebook: import getpass import os os.environ["AZURE_OPENAI_API_KEY"] = "d957dadfasdfafdsfsafasfasfsafasf99f4b7" from langchain_openai import AzureChatOpenAI model = AzureChatOpenAI( azure_endpoint=os.environ["https://testing123.cognitiveservices.azure.com/"], azure_deployment=os.environ["testing123"], openai_api_version=os.environ["2021-04-30"], ) Error I got after run: KeyError Traceback (most…

VIEW QUESTION

troubleshooting Azure API Management URI rewrite

Arriving URL format https://my-apim.azure-api.net/product/service1/v3/service1/operation. Client library prefix second "service1" to the URL, my base URL: "https://my-apim.azure-api.net/product/service1/" , version - v3, operation - "/operation". Because of second "service1" in the URL APIM can't find matching API operation. I have added rewrite-uri…

VIEW QUESTION
Back To Top
Search