Skip to content

Commit 5088ce1

Browse files
authored
Merge branch 'openai:main' into addtestframeworktake2
2 parents a044e6e + e4963f0 commit 5088ce1

File tree

8 files changed

+112
-112
lines changed

8 files changed

+112
-112
lines changed

codegen/generator/src/OpenAI.Library.Plugin.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.TypeSpec.Generator.ClientModel" Version="1.0.0-alpha.20250903.1" />
11+
<PackageReference Include="Microsoft.TypeSpec.Generator.ClientModel" Version="1.0.0-alpha.20250905.1" />
1212
</ItemGroup>
1313

1414
<!-- Copy output to package dist path for local execution and -->
@@ -23,3 +23,4 @@
2323

2424
</Project>
2525

26+

codegen/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@open-ai/plugin": "file:",
3232
"@azure-tools/typespec-client-generator-core": "0.59.0",
3333
"@azure-tools/typespec-azure-core": "0.59.0",
34-
"@typespec/http-client-csharp": "1.0.0-alpha.20250903.1",
34+
"@typespec/http-client-csharp": "1.0.0-alpha.20250905.1",
3535
"@typespec/http": "1.3.0",
3636
"@typespec/openapi": "1.3.0"
3737
},

examples/Responses/Example05_RemoteMcp.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public void Example05_RemoteMcp()
3131

3232
OpenAIResponseClient client = new(model: "gpt-5", apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY"));
3333

34-
OpenAIResponse response = client.CreateResponse("Roll 2d4+1");
34+
OpenAIResponse response = client.CreateResponse("Roll 2d4+1", options);
3535

3636
Console.WriteLine($"[ASSISTANT]: {response.GetOutputText()}");
3737
}

examples/Responses/Example05_RemoteMcpAsync.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public async Task Example05_RemoteMcpAsync()
3232

3333
OpenAIResponseClient client = new(model: "gpt-5", apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY"));
3434

35-
OpenAIResponse response = await client.CreateResponseAsync("Roll 2d4+1");
35+
OpenAIResponse response = await client.CreateResponseAsync("Roll 2d4+1", options);
3636

3737
Console.WriteLine($"[ASSISTANT]: {response.GetOutputText()}");
3838
}

package-lock.json

Lines changed: 104 additions & 104 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Custom/Responses/Items/Reasoning/ReasoningResponseItem.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ public ReasoningResponseItem(string summaryText) : this(summaryParts: [new Reaso
1919
// CUSTOM: Added for convenience.
2020
public string GetSummaryText()
2121
{
22-
return string.Join(
23-
separator: string.Empty,
22+
return string.Concat(
2423
values: SummaryParts.Select(part => (part as ReasoningSummaryTextPart)?.Text ?? string.Empty));
2524
}
2625
}

src/Custom/Responses/OpenAIResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ public string GetOutputText()
6767
.Select(item => item as MessageResponseItem)
6868
.SelectMany(message => message.Content.Where(contentPart => contentPart.Kind == ResponseContentPartKind.OutputText)
6969
.Select(outputTextPart => outputTextPart.Text));
70-
return outputTextSegments.Any() ? string.Join(string.Empty, outputTextSegments) : null;
70+
return outputTextSegments.Any() ? string.Concat(outputTextSegments) : null;
7171
}
7272
}

tests/Responses/ResponsesTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public async Task StreamingResponses()
253253
}
254254
Assert.That(deltaTextSegments, Has.Count.GreaterThan(0));
255255
Assert.That(finalResponseText, Is.Not.Null.And.Not.Empty);
256-
Assert.That(string.Join(string.Empty, deltaTextSegments), Is.EqualTo(finalResponseText));
256+
Assert.That(string.Concat(deltaTextSegments), Is.EqualTo(finalResponseText));
257257
}
258258

259259
[Test]

0 commit comments

Comments
 (0)