Package org.mockserver.llm.client
Class AzureOpenAiLlmClient
java.lang.Object
org.mockserver.llm.client.AbstractLlmClient
org.mockserver.llm.client.OpenAiLlmClient
org.mockserver.llm.client.AzureOpenAiLlmClient
- All Implemented Interfaces:
LlmClient
Runtime client for Azure OpenAI. Wire-compatible with OpenAI Chat Completions
for request body and response parsing, but uses the per-deployment URL shape
(
{baseUrl}/openai/deployments/{model}/chat/completions?api-version=…)
and the api-key header instead of Authorization: Bearer.
Response parsing is inherited from OpenAiLlmClient.-
Field Summary
Fields inherited from class org.mockserver.llm.client.AbstractLlmClient
OBJECT_MAPPER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildCompletionRequest(LlmBackend backend, ParsedConversation prompt) Build the outbound completion request (URL path, auth headers, request body) for the given backend and prompt.provider()The provider this client handles — the registry key.Methods inherited from class org.mockserver.llm.client.OpenAiLlmClient
parseCompletionResponseMethods inherited from class org.mockserver.llm.client.AbstractLlmClient
appendRoleContentMessages, postJson, readBody, resolveBaseUrl, resolveModel, writeJson
-
Constructor Details
-
AzureOpenAiLlmClient
public AzureOpenAiLlmClient()
-
-
Method Details
-
provider
Description copied from interface:LlmClientThe provider this client handles — the registry key.- Specified by:
providerin interfaceLlmClient- Overrides:
providerin classOpenAiLlmClient
-
buildCompletionRequest
Description copied from interface:LlmClientBuild the outbound completion request (URL path, auth headers, request body) for the given backend and prompt. The returned request carries the socket address resolved from the backend's base URL (or the provider default). Implementations pintemperature=0and a seed where the provider supports it, for reproducibility.- Specified by:
buildCompletionRequestin interfaceLlmClient- Overrides:
buildCompletionRequestin classOpenAiLlmClient
-