mirror of
https://github.com/wolfpld/tracy.git
synced 2026-11-13 11:25:51 +00:00
Pass current and end chat iterators to TracyLlmChat::Turn().
This commit is contained in:
@@ -527,7 +527,7 @@ void TracyLlm::Draw()
|
||||
{
|
||||
think = TracyLlmChat::Think::ToolCall;
|
||||
}
|
||||
if( !m_chatUi->Turn( role, line, think, turnIdx == m_chat.size() - 1 ) )
|
||||
if( !m_chatUi->Turn( role, it, m_chat.end(), think, turnIdx == m_chat.size() - 1 ) )
|
||||
{
|
||||
if( role == TracyLlmChat::TurnRole::Assistant )
|
||||
{
|
||||
|
||||
@@ -105,8 +105,10 @@ void TracyLlmChat::End()
|
||||
}
|
||||
}
|
||||
|
||||
bool TracyLlmChat::Turn( TurnRole role, const nlohmann::json& json, Think think, bool last )
|
||||
bool TracyLlmChat::Turn( TurnRole role, std::vector<nlohmann::json>::iterator it, const std::vector<nlohmann::json>::iterator& end, Think think, bool last )
|
||||
{
|
||||
auto& json = *it;
|
||||
|
||||
bool keep = true;
|
||||
const auto& roleData = roles[(int)role];
|
||||
const bool roleChange = role != m_role;
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
void Begin();
|
||||
void End();
|
||||
|
||||
bool Turn( TurnRole role, const nlohmann::json& json, Think think, bool last );
|
||||
bool Turn( TurnRole role, std::vector<nlohmann::json>::iterator it, const std::vector<nlohmann::json>::iterator& end, Think think, bool last );
|
||||
|
||||
private:
|
||||
void NormalScope();
|
||||
|
||||
Reference in New Issue
Block a user