| Name | Type | Description |
|---|---|---|
model* | unknown | Azure deployment name. Defaults to |
endpoint | str | None | Default: NoneDirect OpenAI-compatible resource URL ending in |
project_endpoint | str | None | Default: NoneFoundry project URL. Defaults to
|
credential | str | AzureKeyCredential | TokenCredential | AsyncTokenCredential | None | Default: None |
**kwargs | Any | Default: {} |
Ask typed questions with the Azure OpenAI Decisions API in Foundry.
Inherits question handling, response parsing, batching, retries, and synchronous
and asynchronous invocation from OpenAIClassifier. It implements LangChain's
BaseDecisionModel interface with Core question and answer types. Its upstream
API is beta.
The model is an Azure deployment name for a supported Decisions model,
currently gpt-6-luna. This integration uses /openai/v1/decisions.
Note:
Box questions are unsupported and raise ValueError. Choice
requires at least two labels. Other input limits follow OpenAIClassifier.
Example:
from azure.identity import DefaultAzureCredential
from langchain_azure_ai.decisions import AzureAIOpenAIApiDecisions, Noul
decisions = AzureAIOpenAIApiDecisions(
endpoint="https://my-resource.openai.azure.com/openai/v1",
credential=DefaultAzureCredential(),
model="my-luna-deployment",
)
answer = decisions.invoke({
"state": "Please refund the duplicate charge.",
"questions": {"refund": Noul(instructions="Is a refund requested?")},
})
print(answer.nouls["refund"].noul)API key, AzureKeyCredential, TokenCredential, or
AsyncTokenCredential. Defaults to AZURE_OPENAI_API_KEY for a
direct endpoint, then DefaultAzureCredential. Project endpoints
require a token credential and default to DefaultAzureCredential.
An async-only credential requires ainvoke or abatch.
Options accepted by OpenAIClassifier, including timeout,
max_retries, HTTP clients, headers, and query parameters. An explicit
api_key or token callable can be used instead of credential.