Running through the steps and I hit following problem when running python src/run.py --question "which tent is the most waterproof?"
Actual outcome:
openai.error.AuthenticationError: Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource.
This problem happened because I had OPENAI_API_KEY environment variable already set for non-Azure OpenAI.
The copilot sample uses environment variables from .env file, and uses the same OPENAI_API_KEY key also for Azure,
which causes the conflict.
By modifying run.py to override the existing env variables by load_dotenv(override=True), the scenario works.
Running through the steps and I hit following problem when running
python src/run.py --question "which tent is the most waterproof?"
Actual outcome: openai.error.AuthenticationError: Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource.
This problem happened because I had OPENAI_API_KEY environment variable already set for non-Azure OpenAI. The copilot sample uses environment variables from .env file, and uses the same OPENAI_API_KEY key also for Azure, which causes the conflict.
By modifying run.py to override the existing env variables by
load_dotenv(override=True)
, the scenario works.