shopping-assistant-api/ShoppingAssistantApi.Domain/Enums/OpenAiRole.cs
shchoholiev 68ab565800 SA-197 Add suggestions to product search
- Change OpenAI prompt
- Update logic OpenAI response handling
- Start refactoring of  SearchProductAsync()
- Add GetWishlistMessagesAsync() to MessagesRepository to retrieve all messages for wishlist
2023-12-11 00:49:08 +00:00

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",
_ => "",
};
}
}