mirror of
https://gitlab.com/niansa/discord_llama.git
synced 2025-03-06 20:48:25 +01:00
Show shard ID in thread name
This commit is contained in:
parent
85f2777f0e
commit
ae9f11dd02
1 changed files with 11 additions and 1 deletions
12
main.cpp
12
main.cpp
|
@ -501,7 +501,9 @@ private:
|
|||
if (!on_own_shard(thread->id)) return;
|
||||
// Set name
|
||||
std::cout << "Responsible for finalizing thread: " << thread->id << std::endl;
|
||||
thread->name = "Chat with "+model_name+" "+(instruct_mode?"(Instruct mode)":"");
|
||||
thread->name = "Chat with "+model_name+" " // Model name
|
||||
+(instruct_mode?"":"(Non Instruct mode) ") // Instruct mode
|
||||
+'#'+(config.shard_count!=1?std::to_string(config.shard_id):""); // Shard ID
|
||||
bot.channel_edit(*thread);
|
||||
}
|
||||
}
|
||||
|
@ -871,6 +873,14 @@ int main(int argc, char **argv) {
|
|||
std::cerr << "Error: Scroll_keep must be a non-float percentage and in a range of 0-99." << std::endl;
|
||||
exit(-12);
|
||||
}
|
||||
if (cfg.shard_count == 0) {
|
||||
std::cerr << "Error: Shard count must be above zero." << std::endl;
|
||||
exit(-13);
|
||||
}
|
||||
if (cfg.shard_id >= cfg.shard_count) {
|
||||
std::cerr << "Error: Not enough shards for this ID to exist." << std::endl;
|
||||
exit(-13);
|
||||
}
|
||||
|
||||
// Construct and configure bot
|
||||
Bot bot(cfg, models);
|
||||
|
|
Loading…
Add table
Reference in a new issue