* Get Azure Blob configuration for a given context
(context: StorageContext)
| 208 | * Get Azure Blob configuration for a given context |
| 209 | */ |
| 210 | function getBlobConfig(context: StorageContext): StorageConfig { |
| 211 | switch (context) { |
| 212 | case 'knowledge-base': |
| 213 | return { |
| 214 | accountName: BLOB_KB_CONFIG.accountName, |
| 215 | accountKey: BLOB_KB_CONFIG.accountKey, |
| 216 | connectionString: BLOB_KB_CONFIG.connectionString, |
| 217 | containerName: BLOB_KB_CONFIG.containerName, |
| 218 | } |
| 219 | case 'chat': |
| 220 | return { |
| 221 | accountName: BLOB_CHAT_CONFIG.accountName, |
| 222 | accountKey: BLOB_CHAT_CONFIG.accountKey, |
| 223 | connectionString: BLOB_CHAT_CONFIG.connectionString, |
| 224 | containerName: BLOB_CHAT_CONFIG.containerName, |
| 225 | } |
| 226 | case 'copilot': |
| 227 | return { |
| 228 | accountName: BLOB_COPILOT_CONFIG.accountName, |
| 229 | accountKey: BLOB_COPILOT_CONFIG.accountKey, |
| 230 | connectionString: BLOB_COPILOT_CONFIG.connectionString, |
| 231 | containerName: BLOB_COPILOT_CONFIG.containerName, |
| 232 | } |
| 233 | case 'execution': |
| 234 | return { |
| 235 | accountName: BLOB_EXECUTION_FILES_CONFIG.accountName, |
| 236 | accountKey: BLOB_EXECUTION_FILES_CONFIG.accountKey, |
| 237 | connectionString: BLOB_EXECUTION_FILES_CONFIG.connectionString, |
| 238 | containerName: BLOB_EXECUTION_FILES_CONFIG.containerName, |
| 239 | } |
| 240 | case 'mothership': |
| 241 | case 'workspace': |
| 242 | return { |
| 243 | accountName: BLOB_CONFIG.accountName, |
| 244 | accountKey: BLOB_CONFIG.accountKey, |
| 245 | connectionString: BLOB_CONFIG.connectionString, |
| 246 | containerName: BLOB_CONFIG.containerName, |
| 247 | } |
| 248 | case 'profile-pictures': |
| 249 | return { |
| 250 | accountName: BLOB_PROFILE_PICTURES_CONFIG.accountName, |
| 251 | accountKey: BLOB_PROFILE_PICTURES_CONFIG.accountKey, |
| 252 | connectionString: BLOB_PROFILE_PICTURES_CONFIG.connectionString, |
| 253 | containerName: BLOB_PROFILE_PICTURES_CONFIG.containerName, |
| 254 | } |
| 255 | case 'og-images': |
| 256 | return { |
| 257 | accountName: BLOB_OG_IMAGES_CONFIG.accountName || BLOB_CONFIG.accountName, |
| 258 | accountKey: BLOB_OG_IMAGES_CONFIG.accountKey || BLOB_CONFIG.accountKey, |
| 259 | connectionString: BLOB_OG_IMAGES_CONFIG.connectionString || BLOB_CONFIG.connectionString, |
| 260 | containerName: BLOB_OG_IMAGES_CONFIG.containerName || BLOB_CONFIG.containerName, |
| 261 | } |
| 262 | case 'workspace-logos': |
| 263 | return { |
| 264 | accountName: BLOB_WORKSPACE_LOGOS_CONFIG.accountName || BLOB_CONFIG.accountName, |
| 265 | accountKey: BLOB_WORKSPACE_LOGOS_CONFIG.accountKey || BLOB_CONFIG.accountKey, |
| 266 | connectionString: |
| 267 | BLOB_WORKSPACE_LOGOS_CONFIG.connectionString || BLOB_CONFIG.connectionString, |