(fullUrl: string)
| 93 | * @returns The deployment name or null if not found |
| 94 | */ |
| 95 | export function extractDeploymentFromUrl(fullUrl: string): string | null { |
| 96 | // Match /deployments/{deployment-name}/ pattern |
| 97 | const match = fullUrl.match(/\/deployments\/([^/]+)/i) |
| 98 | return match ? match[1] : null |
| 99 | } |
| 100 | |
| 101 | /** |
| 102 | * Extracts the api-version from a full Azure OpenAI URL query string. |