Skip to content

Commit

Permalink
AI chat: Fix context properly keeping all previous conversations.
Browse files Browse the repository at this point in the history
  • Loading branch information
mostlikely4r committed Dec 1, 2024
1 parent 31f3e84 commit b44b091
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion playerbot/strategy/actions/RpgSubActions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ bool RpgAIChatAction::RequestNewLines()

for (auto& prompt : jsonFill)
{
BOT_TEXT2(prompt.second, placeholders);
prompt.second = BOT_TEXT2(prompt.second, placeholders);
}

uint32 currentLength = jsonFill["<pre prompt>"].size() + jsonFill["<context>"].size() + jsonFill["<prompt>"].size() + llmContext.size();
Expand Down
2 changes: 1 addition & 1 deletion playerbot/strategy/actions/SayAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ void ChatReplyAction::ChatReplyDo(Player* bot, uint32 type, uint32 guid1, uint32

for (auto& prompt : jsonFill)
{
BOT_TEXT2(prompt.second, placeholders);
prompt.second = BOT_TEXT2(prompt.second, placeholders);
}

uint32 currentLength = jsonFill["<pre prompt>"].size() + jsonFill["<context>"].size() + jsonFill["<prompt>"].size() + llmContext.size();
Expand Down

0 comments on commit b44b091

Please sign in to comment.