Added speaker hinting
This commit is contained in:
@@ -96,16 +96,16 @@ async Task AnswerChat(long chatId, string input) {
|
|||||||
if (!oaiChats.ContainsKey(chatId))
|
if (!oaiChats.ContainsKey(chatId))
|
||||||
AddChatToDictionary(chatId);
|
AddChatToDictionary(chatId);
|
||||||
|
|
||||||
string text = input;
|
|
||||||
//Limit the message to 1024 characters to avoid out of context jump
|
//Limit the message to 1024 characters to avoid out of context jump
|
||||||
|
string text = input;
|
||||||
if (input.Length > 1024) text = input.Substring(0, 1024);
|
if (input.Length > 1024) text = input.Substring(0, 1024);
|
||||||
|
|
||||||
//Add the current message to the chat
|
//Add the current message to the chat
|
||||||
//oaiChats[chatId].Add(new UserChatMessage(text));
|
|
||||||
ChatMessageRotate(chatId, new UserChatMessage(text));
|
ChatMessageRotate(chatId, new UserChatMessage(text));
|
||||||
|
|
||||||
//fetch existing messages history
|
//fetch existing messages history, append hint of the speaker to the message:
|
||||||
var messages = oaiChats[chatId];
|
var messages = oaiChats[chatId];
|
||||||
|
messages.Add(new AssistantChatMessage("Nemesis: "));
|
||||||
|
|
||||||
//Fetch the response from the model
|
//Fetch the response from the model
|
||||||
var result = chatClient.CompleteChat(messages).Value.Content[0].Text;
|
var result = chatClient.CompleteChat(messages).Value.Content[0].Text;
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
"19 Daily - 01
|
"19 Daily - 01
|
||||||
...Birds with great wings... casting shadows in their pupils..."
|
Nemesis:...Birds with great wings... casting shadows in their pupils..."
|
||||||
|
|
||||||
"20 Daily - 02
|
"20 Daily - 02
|
||||||
...Staring... at the edge of existence... my sight falters... a void without end... darkness stirs from beneath..."
|
Nemesis:...Staring... at the edge of existence... my sight falters... a void without end... darkness stirs from beneath..."
|
||||||
|
|
||||||
"21 Daily - 03
|
"21 Daily - 03
|
||||||
...Mountains surrender to the torrent's pull... shores swallowed by the dying light..."
|
Nemesis:...Mountains surrender to the torrent's pull... shores swallowed by the dying light..."
|
||||||
|
|
||||||
"22 Daily - 04
|
"22 Daily - 04
|
||||||
...Tempest awakens suddenly... howling and wailing... silence surges forth..."
|
Nemesis:...Tempest awakens suddenly... howling and wailing... silence surges forth..."
|
||||||
|
|
||||||
"23 Daily - 05
|
"23 Daily - 05
|
||||||
...Untouched, clear as glass... serene and radiant... a hall of mirrors... an unyielding stone... adversity endures..."
|
Nemesis:...Untouched, clear as glass... serene and radiant... a hall of mirrors... an unyielding stone... adversity endures..."
|
||||||
|
|
||||||
"25 Login
|
"25 Login
|
||||||
...Stars... shifting along their myriad paths..."
|
Nemesis:...Stars... shifting along their myriad paths..."
|
||||||
|
|
||||||
"26 Obtain
|
"26 Obtain
|
||||||
...The pages... whispering mountain breeze... expanding..."
|
Nemesis:...The pages... whispering mountain breeze... expanding..."
|
||||||
|
|
||||||
"17 Fail
|
"17 Fail
|
||||||
...The wind whispers through the forest... Submerging... Piercing... the quiet warmth of celestial fire..."
|
Nemesis:...The wind whispers through the forest... Submerging... Piercing... the quiet warmth of celestial fire..."
|
||||||
|
|
||||||
"16 Victory
|
"16 Victory
|
||||||
...Part from the timeless realm... Whisper prayers for the fall... the infinite starlight... the peace cloaked in shadow..."
|
Nemesis:...Part from the timeless realm... Whisper prayers for the fall... the infinite starlight... the peace cloaked in shadow..."
|
||||||
|
|
||||||
"Krolik: Feels pretty good. It's lighter than my previous one.
|
"Krolik: Feels pretty good. It's lighter than my previous one.
|
||||||
Nemesis: ...Humph...
|
Nemesis: ...Humph...
|
||||||
|
|||||||
Reference in New Issue
Block a user