Krasse Ideen von Mr. GPT

This commit is contained in:
jankaminski1
2023-09-20 12:22:52 +02:00
parent 0b9427e9e5
commit 22351d0e1d
6 changed files with 157 additions and 53 deletions

View File

@ -171,6 +171,7 @@
new() { Position = TooltipPosition.Bottom, Duration = null});
private string _imagePromptEnglish = "";
private string _imageIdea = "";
private string _imageDescription = "";
private string _imagePrompt = "";
@ -181,6 +182,7 @@
private Conversation converse;
private string _basePrompt;
private string _ideaPrompt;
private string _imageUrl;
@ -402,16 +404,23 @@
_addonsVisible = false;
_bothVisible = _buttonVisible && _addonsVisible;
await UpdateBusyMessage("Kirstens Assistent zerbricht sich über deine Idee den Kopf...");
_basePrompt = await File.ReadAllTextAsync($"{Directory.GetCurrentDirectory()}{@"/wwwroot/test_prompt.txt"}");
_ideaPrompt = await File.ReadAllTextAsync($"{Directory.GetCurrentDirectory()}{@"/wwwroot/idea_prompt.txt"}");
ChatRequest chatRequest = new ChatRequest
{
Temperature = temperature,
Model = Model.ChatGPTTurbo,
Model = Model.GPT4,
};
converse = _openAiApi.Chat.CreateConversation(chatRequest);
converse.AppendUserInput(_basePrompt + " " + request);
converse.AppendUserInput(_ideaPrompt + " " + request);
_imageIdea = await converse.GetResponseFromChatbotAsync();
_basePrompt = await File.ReadAllTextAsync($"{Directory.GetCurrentDirectory()}{@"/wwwroot/test_prompt2.txt"}");
converse.AppendUserInput(_basePrompt);
}
else
{