Azure-Samples / Azure-Samples/openai

Authorization Failed Error When Prompting Azure OpenAI UI

Open
#120 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
1.3k
Forks
455
Avg merge
16h 17m
Merged PRs (30d)
1

Description

> Please provide us with the following information:
> I'm encountering an authorization error when attempting to prompt my chatbot locally on my system. Once, I send a request or a question, the UI runs for like 10 seconds and returns an error. The error appears to be related to Azure Search service authorization.

### This issue is for a: (mark with an `x`)
```
- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
```

### Minimal steps to reproduce
>Open Command Prompt.
Activate the Conda environment:
Navigate to the project directory: cd
Log in to Azure CLI: az login.
Select the appropriate subscription and tenant.
Run the python script: python .py

### Any log messages given by the failure
>Authorization failed

### Expected/desired behavior
>Prompt the chatbot UI interface and get a text response as you would in chatGPT. See attached screenshot of the error message i get instead on the user interface.
![Screenshot 2024-07-08 162737](https://github.com/user-attachments/assets/86e3d05d-5586-4405-b3c1-f148c9ffccb0)

### OS and Version?
> Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

### Versions
>OS: Windows 11

### Mention any other details that might be useful

> Environment Summary
Name: azure-core
Version: 1.30.2
Summary: Microsoft Azure Core Library for Python
Home-page: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core
Author: Microsoft Corporation
Author-email: [azpysdkhelp@microsoft.com](mailto:azpysdkhelp@microsoft.com)
License: MIT License
Location: c:\users\t-grbabalola\appdata\local\anaconda3\envs\chatosp\lib\site-packages
Requires: requests, six, typing-extensions
Required-by: azure-identity, azure-search-documents, msrest
> Thanks! We'll be in touch soon.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.