-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
409 additions
and
433 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
51 changes: 26 additions & 25 deletions
51
src/tests/OpenAI.Generators.IntegrationTests/MaintenanceFunctions.cs
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 |
---|---|---|
@@ -1,25 +1,26 @@ | ||
// using System.Threading; | ||
// using System.Threading.Tasks; | ||
// using tryAGI.OpenAI; | ||
// | ||
// namespace H.Ipc.Generator.IntegrationTests; | ||
// | ||
// [OpenAiFunctions] | ||
// public interface IMaintenanceFunctions | ||
// { | ||
// [System.ComponentModel.Description("Get the tasks to extract from a contract")] | ||
// public Task<ExtractTasksRequest> GetContractTasksAsync([System.ComponentModel.Description("The tasks extracted from the contract")] ExtractTasksRequest tasks, CancellationToken cancellationToken = default); | ||
// } | ||
// | ||
// public class MaintenanceService : IMaintenanceFunctions | ||
// { | ||
// public Task<ExtractTasksRequest> GetContractTasksAsync(ExtractTasksRequest tasks, CancellationToken cancellationToken = default) | ||
// { | ||
// return Task.FromResult(tasks); | ||
// } | ||
// } | ||
// | ||
// public class ExtractTasksRequest | ||
// { | ||
// public string[] Tasks { get; set; } | ||
// } | ||
using System; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using tryAGI.OpenAI; | ||
|
||
namespace H.Ipc.Generator.IntegrationTests; | ||
|
||
[OpenAiFunctions] | ||
public interface IMaintenanceFunctions | ||
{ | ||
[System.ComponentModel.Description("Get the tasks to extract from a contract")] | ||
public Task<ExtractTasksRequest> GetContractTasksAsync([System.ComponentModel.Description("The tasks extracted from the contract")] ExtractTasksRequest tasks, CancellationToken cancellationToken = default); | ||
} | ||
|
||
public class MaintenanceService : IMaintenanceFunctions | ||
{ | ||
public Task<ExtractTasksRequest> GetContractTasksAsync(ExtractTasksRequest tasks, CancellationToken cancellationToken = default) | ||
{ | ||
return Task.FromResult(tasks); | ||
} | ||
} | ||
|
||
public class ExtractTasksRequest | ||
{ | ||
public string[] Tasks { get; set; } = Array.Empty<string>(); | ||
} |
227 changes: 112 additions & 115 deletions
227
src/tests/OpenAI.Generators.IntegrationTests/Tests.Functions.cs
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
Oops, something went wrong.