Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultAPIVersion = "2025-04-01-preview"
DefaultAPIVersion is the default Azure OpenAI API version.
Variables ¶
This section is empty.
Functions ¶
func AzureDeploymentMiddleware ¶
func AzureDeploymentMiddleware(req *http.Request, next option.MiddlewareNext) (*http.Response, error)
AzureDeploymentMiddleware transforms Azure OpenAI API paths to include the deployment name. Azure requires URLs like: /openai/deployments/{deployment-name}/chat/completions but the SDK sends paths like /chat/completions
func BuildEndpoint ¶
BuildEndpoint appends the /openai/ suffix to the given base URL.
func ExtractDeploymentFromBody ¶
ExtractDeploymentFromBody reads the model field from the JSON request body and restores the body for subsequent use.
func ParseDeployments ¶
ParseDeployments splits a comma-separated deployment string into a slice, trimming whitespace and discarding empty entries.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.