Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions sdk/ai/azure-ai-projects/PostEmitter.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,23 @@ $c = $c -replace '(id: str = rest_field\(visibility=\["read", "create", "update"
$c = $c -replace '(conversation_id: str = rest_field\(visibility=\["read", "create", "update", "delete", "query"\]\))(\r?\n """The id of the conversation this response belongs to\. Required\.""")', '$1 # type: ignore[reportIncompatibleVariableOverride]$2'
Set-Content $f $c -NoNewline

# VoiceAgentSessionResponse and VoiceAgentSessionUpdate are single-member unions. The emitter
# represents them as string-valued aliases in _unions.py, which mypy cannot use as annotations.
# Reference the concrete models directly while retaining forward references for their later
# definitions in this generated module.
$f = 'azure\ai\projects\models\_models.py'
$c = Get-Content $f -Raw
$c = $c.Replace('"_unions.VoiceAgentSessionResponse"', '"VoiceAgentSessionResponseConfig"')
$c = $c.Replace('"_unions.VoiceAgentSessionUpdate"', '"VoiceAgentSessionUpdateConfig"')
Set-Content $f $c -NoNewline

# Strip whitespace emitted on otherwise blank docstring lines so generated files pass diff checks.
foreach ($f in @('azure\ai\projects\models\_models.py', 'azure\ai\projects\types.py')) {
$c = Get-Content $f -Raw
$c = [regex]::Replace($c, '[ \t]+(?=\r?\n|$)', '')
Set-Content $f $c -NoNewline
}

# Finishing by running 'black' tool to format code.
pip install black
black --config ../../../eng/black-pyproject.toml .
191 changes: 90 additions & 101 deletions sdk/ai/azure-ai-projects/apiview-properties.json

Large diffs are not rendered by default.

24 changes: 6 additions & 18 deletions sdk/ai/azure-ai-projects/azure/ai/projects/_unions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,13 @@
Literal["none"], Literal["auto"], Literal["required"], "_models.ToolChoiceFunction", "_models.ToolChoiceMCP"
]
VoiceAgentTurnDetection = Union[
"_models.VoiceServerVadTurnDetection",
"_models.VoiceAgentServerVadTurnDetection",
"_models.VoiceAgentSemanticVadTurnDetection",
"_models.VoiceAzureSemanticVadTurnDetection",
"_models.VoiceAzureSemanticVadEnTurnDetection",
"_models.VoiceAzureSemanticVadMultilingualTurnDetection",
"_models.VoiceAgentAzureSemanticVadTurnDetection",
"_models.VoiceAgentAzureSemanticVadEnTurnDetection",
"_models.VoiceAgentAzureSemanticVadMultilingualTurnDetection",
]
VoiceAgentMaxOutputTokens = Union[int, Literal["inf"]]
VoiceAgentInterimResponse = Union[
"_models.VoiceAgentStaticInterimResponseConfig", "_models.VoiceAgentLlmInterimResponseConfig"
]
VoiceConversationItem = Union[
"_models.VoiceSystemMessageItem",
"_models.VoiceUserMessageItem",
"_models.VoiceAssistantMessageItem",
"_models.VoiceFunctionCallItem",
"_models.VoiceFunctionCallOutputItem",
"_models.VoiceMcpListToolsItem",
"_models.VoiceMcpCallItem",
"_models.VoiceMcpApprovalRequestItem",
"_models.VoiceMcpApprovalResponseItem",
]
VoiceAgentSessionUpdate = "_models.VoiceAgentSessionUpdateConfig"
VoiceAgentSessionResponse = "_models.VoiceAgentSessionResponseConfig"
GenerateAgentRequest = "_models.GenerateVoiceAgentRequest"

Large diffs are not rendered by default.

Loading