Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3303fd9

Browse files
authored
Fix generated serialization name of "partial_image_b64" (#807)
1 parent66f8ae5 commit3303fd9

8 files changed

+1227
-265
lines changed

‎specification/client/responses.client.tsp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,15 @@ using TypeSpec.HttpClient.CSharp;
7575

7676
// ------------ Streaming ------------
7777

78+
@@usage(ResponseStreamEvent,Usage.json);
79+
7880
@@alternateType(ResponseFunctionCallArgumentsDoneEvent.arguments,unknown);
79-
//@@clientName(ResponseFunctionCallArgumentsDoneEvent.arguments, "FunctionArguments");
81+
@@clientName(ResponseFunctionCallArgumentsDoneEvent.arguments,"FunctionArguments");
8082

8183
@@alternateType(ResponseFunctionCallArgumentsDeltaEvent.delta,unknown);
8284

8385
@@alternateType(ResponseMCPCallArgumentsDoneEvent.arguments,unknown);
84-
//@@clientName(ResponseMCPCallArgumentsDoneEvent.arguments, "ToolArguments");
86+
@@clientName(ResponseMCPCallArgumentsDoneEvent.arguments,"ToolArguments");
8587

8688
@@alternateType(ResponseMCPCallArgumentsDeltaEvent.delta,unknown);
8789

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
usingSystem;
2-
31
namespaceOpenAI.Responses;
42

53
// CUSTOM: Renamed.
64
[CodeGenType("ResponseFunctionCallArgumentsDoneEvent")]
75
publicpartialclassStreamingResponseFunctionCallArgumentsDoneUpdate
86
{
9-
// CUSTOM: Renamed.
10-
[CodeGenMember("Arguments")]
11-
publicBinaryDataFunctionArguments{get;}
127
}
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
usingSystem;
2-
3-
namespaceOpenAI.Responses;
1+
namespaceOpenAI.Responses;
42

53
// CUSTOM: Renamed.
64
[CodeGenType("ResponseMCPCallArgumentsDoneEvent")]
75
publicpartialclassStreamingResponseMcpCallArgumentsDoneUpdate
86
{
9-
// CUSTOM: Renamed.
10-
[CodeGenMember("Arguments")]
11-
publicBinaryDataToolArguments{get;}
127
}

‎src/Generated/Models/Responses/StreamingResponseFunctionCallArgumentsDoneUpdate.cs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,7 @@ internal StreamingResponseFunctionCallArgumentsDoneUpdate(InternalResponseStream
3030
publicstringItemId{get;}
3131

3232
publicintOutputIndex{get;}
33+
34+
publicBinaryDataFunctionArguments{get;}
3335
}
3436
}

‎src/Generated/Models/Responses/StreamingResponseImageGenerationCallPartialImageUpdate.Serialization.cs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri
5555
writer.WritePropertyName("partial_image_index"u8);
5656
writer.WriteNumberValue(PartialImageIndex);
5757
}
58-
if(!Patch.Contains("$.PartialImageBytes"u8))
58+
if(!Patch.Contains("$.partial_image_b64"u8))
5959
{
60-
writer.WritePropertyName("PartialImageBytes"u8);
60+
writer.WritePropertyName("partial_image_b64"u8);
6161
writer.WriteBase64StringValue(PartialImageBytes.ToArray(),"D");
6262
}
6363

@@ -120,7 +120,7 @@ internal static StreamingResponseImageGenerationCallPartialImageUpdate Deseriali
120120
partialImageIndex=prop.Value.GetInt32();
121121
continue;
122122
}
123-
if(prop.NameEquals("PartialImageBytes"u8))
123+
if(prop.NameEquals("partial_image_b64"u8))
124124
{
125125
partialImageBytes=BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D"));
126126
continue;

‎src/Generated/Models/Responses/StreamingResponseMcpCallArgumentsDoneUpdate.cs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,7 @@ internal StreamingResponseMcpCallArgumentsDoneUpdate(InternalResponseStreamEvent
3030
publicintOutputIndex{get;}
3131

3232
publicstringItemId{get;}
33+
34+
publicBinaryDataToolArguments{get;}
3335
}
3436
}

‎tests/Responses/ResponsesToolTests.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,7 @@ in client.CreateResponseStreamingAsync(message, responseOptions))
762762
imageGenItemId??=imageGenCallInPartialUpdate.ItemId;
763763
Assert.That(imageGenItemId,Is.EqualTo(imageGenCallInPartialUpdate.ItemId));
764764
Assert.That(imageGenCallInPartialUpdate.OutputIndex,Is.EqualTo(0));
765+
Assert.That(imageGenCallInPartialUpdate.PartialImageBytes,Is.Not.Null);
765766
partialCount++;
766767
}
767768
elseif(updateisStreamingResponseImageGenerationCallInProgressUpdateimageGenCallInProgressUpdate)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp