-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'microsoft:main' into fix-model-produced-invalid-content
- Loading branch information
Showing
9 changed files
with
145 additions
and
54 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
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); | ||
} | ||
} | ||
} |
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