Spaces:
Sleeping
Sleeping
initilization
Browse files
README.md
CHANGED
|
@@ -138,6 +138,31 @@ ssh -i "abhi.pem" [email protected]
|
|
| 138 |
|
| 139 |
#installation correct verisons
|
| 140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
|
| 142 |
|
| 143 |
|
|
|
|
| 138 |
|
| 139 |
#installation correct verisons
|
| 140 |
|
| 141 |
+
## Configuration
|
| 142 |
+
|
| 143 |
+
This app requires several Azure OpenAI environment variables to be set for proper operation. You can configure these in two ways:
|
| 144 |
+
|
| 145 |
+
### 1. Local Development (.env file)
|
| 146 |
+
Create a file named `.env` in your project root with the following content (replace values with your actual Azure OpenAI credentials):
|
| 147 |
+
|
| 148 |
+
```
|
| 149 |
+
AZURE_OPENAI_API_KEY=your-azure-openai-key
|
| 150 |
+
AZURE_OPENAI_ENDPOINT=https://your-resource-name.openai.azure.com/
|
| 151 |
+
AZURE_OPENAI_EMBEDDING_DEPLOYMENT=your-embedding-deployment
|
| 152 |
+
AZURE_OPENAI_CHAT_DEPLOYMENT=your-chat-deployment
|
| 153 |
+
AZURE_OPENAI_API_VERSION=2023-05-15
|
| 154 |
+
```
|
| 155 |
+
|
| 156 |
+
### 2. Hugging Face Spaces (Repository Secrets)
|
| 157 |
+
Go to your Space's **Settings** > **Repository secrets** and add the following secrets:
|
| 158 |
+
- `AZURE_OPENAI_API_KEY`
|
| 159 |
+
- `AZURE_OPENAI_ENDPOINT`
|
| 160 |
+
- `AZURE_OPENAI_EMBEDDING_DEPLOYMENT`
|
| 161 |
+
- `AZURE_OPENAI_CHAT_DEPLOYMENT`
|
| 162 |
+
- `AZURE_OPENAI_API_VERSION`
|
| 163 |
+
|
| 164 |
+
**Do not upload your .env file to the repository for security reasons.**
|
| 165 |
+
|
| 166 |
|
| 167 |
|
| 168 |
|