-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[.Net] add output schema to generateReplyOption (#3450)
* add output schema * fix format
- Loading branch information
1 parent
5861bd9
commit 084532e
Showing
7 changed files
with
119 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// OpenAISampleTest.cs | ||
|
||
using System; | ||
using System.IO; | ||
using System.Threading.Tasks; | ||
using AutoGen.OpenAI.Sample; | ||
using AutoGen.Tests; | ||
using Xunit.Abstractions; | ||
|
||
namespace AutoGen.OpenAI.Tests; | ||
|
||
public class OpenAISampleTest | ||
{ | ||
private readonly ITestOutputHelper _output; | ||
|
||
public OpenAISampleTest(ITestOutputHelper output) | ||
{ | ||
_output = output; | ||
Console.SetOut(new ConsoleWriter(_output)); | ||
} | ||
|
||
[ApiKeyFact("OPENAI_API_KEY")] | ||
public async Task Structural_OutputAsync() | ||
{ | ||
await Structural_Output.RunAsync(); | ||
} | ||
|
||
[ApiKeyFact("OPENAI_API_KEY")] | ||
public async Task Use_Json_ModeAsync() | ||
{ | ||
await Use_Json_Mode.RunAsync(); | ||
} | ||
|
||
public class ConsoleWriter : StringWriter | ||
{ | ||
private ITestOutputHelper output; | ||
public ConsoleWriter(ITestOutputHelper output) | ||
{ | ||
this.output = output; | ||
} | ||
|
||
public override void WriteLine(string? m) | ||
{ | ||
output.WriteLine(m); | ||
} | ||
} | ||
} |