.Net: Code interpreter tool abstraction and implementation examples (#110)

* Added code interpreter abstraction updates for OpenAI Assistants

* Updated Persistent Agents implementation based on latest changes in SDK

* Added code interpreter abstraction updates for Azure AI Persistent Agents

* Small note for OpenAI responses code interpreter

* Small update

* Fixes after merge

* Addressed PR feedback

* Small update

* Small fix

* Fix after merge
This commit is contained in:
Dmytro Struk
2025-07-01 14:59:51 +00:00
committed by GitHub
parent 95738b0ac2
commit fbb0fdfe0d
10 changed files with 339 additions and 33 deletions
@@ -20,8 +20,8 @@ public sealed class Step01_ChatClientAgent_Running(ITestOutputHelper output) : A
/// a unique interaction with no conversation history between them.
/// </summary>
[Theory]
[InlineData(ChatClientProviders.OpenAI)]
[InlineData(ChatClientProviders.AzureOpenAI)]
[InlineData(ChatClientProviders.OpenAIChatCompletion)]
[InlineData(ChatClientProviders.OpenAIResponses)]
[InlineData(ChatClientProviders.AzureAIAgentsPersistent)]
public async Task RunWithoutThread(ChatClientProviders provider)
@@ -61,7 +61,6 @@ public sealed class Step01_ChatClientAgent_Running(ITestOutputHelper output) : A
/// Demonstrate the usage of <see cref="ChatClientAgent"/> where a conversation history is maintained.
/// </summary>
[Theory]
[InlineData(ChatClientProviders.OpenAI)]
[InlineData(ChatClientProviders.AzureOpenAI)]
[InlineData(ChatClientProviders.AzureAIAgentsPersistent)]
[InlineData(ChatClientProviders.OpenAIResponses_InMemoryMessageThread)]
@@ -110,7 +109,6 @@ public sealed class Step01_ChatClientAgent_Running(ITestOutputHelper output) : A
/// where a conversation is maintained by the <see cref="AgentThread"/>.
/// </summary>
[Theory]
[InlineData(ChatClientProviders.OpenAI)]
[InlineData(ChatClientProviders.AzureOpenAI)]
[InlineData(ChatClientProviders.AzureAIAgentsPersistent)]
[InlineData(ChatClientProviders.OpenAIResponses_InMemoryMessageThread)]
@@ -9,8 +9,8 @@ namespace Steps;
public sealed class Step02_ChatClientAgent_UsingTools(ITestOutputHelper output) : AgentSample(output)
{
[Theory]
[InlineData(ChatClientProviders.OpenAI)]
[InlineData(ChatClientProviders.AzureOpenAI)]
[InlineData(ChatClientProviders.OpenAIChatCompletion)]
public async Task RunningWithTools(ChatClientProviders provider)
{
// Creating a Menu Tools to be used by the agent.
@@ -57,8 +57,8 @@ public sealed class Step02_ChatClientAgent_UsingTools(ITestOutputHelper output)
}
[Theory]
[InlineData(ChatClientProviders.OpenAI)]
[InlineData(ChatClientProviders.AzureOpenAI)]
[InlineData(ChatClientProviders.OpenAIChatCompletion)]
public async Task StreamingRunWithTools(ChatClientProviders provider)
{
// Creating a Menu Tools to be used by the agent.