mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-23 09:10:51 +00:00
Do not summarize very short llm queries.
This commit is contained in:
@@ -1169,6 +1169,16 @@ void TracyLlm::SendMessage()
|
||||
if( msg.contains( "model" ) ) msg.erase( "model" );
|
||||
}
|
||||
|
||||
if( needSummary && chat.size() == 2 )
|
||||
{
|
||||
auto& content = chat[1]["content"].get_ref<std::string&>();
|
||||
if( content.size() <= 30 )
|
||||
{
|
||||
m_summary = content;
|
||||
needSummary = false;
|
||||
}
|
||||
}
|
||||
|
||||
if( needSummary )
|
||||
{
|
||||
auto query = chat;
|
||||
|
||||
Reference in New Issue
Block a user