mirror of
https://github.com/Shchoholiev/shopping-assistant-api.git
synced 2025-04-04 16:49:36 +00:00
26 lines
527 B
C#
26 lines
527 B
C#
namespace ShoppingAssistantApi.Domain.Enums;
|
|
|
|
public enum OpenAiRole
|
|
{
|
|
System,
|
|
User,
|
|
Assistant
|
|
}
|
|
|
|
public static class OpenAiRoleExtensions
|
|
{
|
|
public static string RequestConvert(this OpenAiRole role)
|
|
{
|
|
switch (role)
|
|
{
|
|
case OpenAiRole.System:
|
|
return "system";
|
|
case OpenAiRole.Assistant:
|
|
return "assistant";
|
|
case OpenAiRole.User:
|
|
return "user";
|
|
default:
|
|
return "";
|
|
}
|
|
}
|
|
} |