Skip to content

Commit

Permalink
add model option to prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
th0mk committed Mar 13, 2024
1 parent ba98839 commit 0b7756d
Show file tree
Hide file tree
Showing 6 changed files with 2,468 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/FMBot.Bot/Services/OpenAiService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public async Task<OpenAiResponse> GetJudgeResponse(List<string> artists, PromptT
artistList.Add(artist[..Math.Min(artist.Length, 36)]);
}

var model = supporter ? "gpt-4" : "gpt-3.5-turbo";
var model = supporter ? prompt.PremiumModel : prompt.FreeModel;

return await SendRequest($"{prompt.Prompt} {string.Join(", ", artistList)}", model);
}
Expand Down
2 changes: 1 addition & 1 deletion src/FMBot.Bot/Services/WhoKnows/WhoKnowsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public static StringBuilder GetGlobalWhoKnowsFooter(StringBuilder footer, WhoKno
}
if (context.ContextUser.PrivacyLevel != PrivacyLevel.Global)
{
footer.AppendLine($"You are currently not globally visible - use '{context.Prefix}privacy' to enable.");
footer.AppendLine($"You're currently not globally visible - use '{context.Prefix}privacy' to enable.");
}
if (settings.HidePrivateUsers)
{
Expand Down
2 changes: 2 additions & 0 deletions src/FMBot.Persistence.Domain/Models/AiPrompt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ public class AiPrompt
public int Version { get; set; }
public string Language { get; set; }
public string Prompt { get; set; }
public string FreeModel { get; set; }
public string PremiumModel { get; set; }
}
Loading

0 comments on commit 0b7756d

Please sign in to comment.