shopping-assistant-api/ShoppingAssistantApi.Domain/Enums/OpenAiRole.cs
2023-10-22 21:40:03 +03:00

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 "";
}
}
}