mirror of
https://github.com/Shchoholiev/shopping-assistant-api.git
synced 2025-04-04 16:49:36 +00:00
- Change OpenAI prompt - Update logic OpenAI response handling - Start refactoring of SearchProductAsync() - Add GetWishlistMessagesAsync() to MessagesRepository to retrieve all messages for wishlist
22 lines
429 B
C#
22 lines
429 B
C#
namespace ShoppingAssistantApi.Domain.Enums;
|
|
|
|
public enum OpenAiRole
|
|
{
|
|
System,
|
|
User,
|
|
Assistant
|
|
}
|
|
|
|
public static class OpenAiRoleExtensions
|
|
{
|
|
public static string ToRequestString(this OpenAiRole role)
|
|
{
|
|
return role switch
|
|
{
|
|
OpenAiRole.System => "system",
|
|
OpenAiRole.Assistant => "assistant",
|
|
OpenAiRole.User => "user",
|
|
_ => "",
|
|
};
|
|
}
|
|
} |