[update] melotts & tts supported vlm input.

This commit is contained in:
LittleMouse
2024-11-18 16:01:50 +08:00
parent 8cf311f77b
commit e37c35a5b3
3 changed files with 4 additions and 5 deletions
@@ -501,7 +501,7 @@ class llm_tts : public StackFlow {
llm_channel->subscriber_work_id(
"", std::bind(&llm_tts::task_user_data, this, llm_task_obj, llm_channel, std::placeholders::_1,
std::placeholders::_2));
} else if (input.find("llm") != std::string::npos) {
} else if ((input.find("llm") != std::string::npos) || (input.find("vlm") != std::string::npos)) {
llm_channel->subscriber_work_id(input,
std::bind(&llm_tts::task_user_data, this, llm_task_obj, llm_channel,
std::placeholders::_1, std::placeholders::_2));
@@ -539,7 +539,7 @@ class llm_tts : public StackFlow {
}
auto llm_channel = get_channel(work_id);
auto llm_task_obj = llm_task_[work_id_num];
if (data.find("llm") != std::string::npos) {
if ((data.find("llm") != std::string::npos) || (data.find("vlm") != std::string::npos)) {
ret = llm_channel->subscriber_work_id(
data, std::bind(&llm_tts::task_user_data, this, llm_task_obj, llm_channel, std::placeholders::_1,
std::placeholders::_2));
+2 -2
View File
@@ -345,7 +345,7 @@ class llm_tts : public StackFlow {
llm_channel->subscriber_work_id(
"", std::bind(&llm_tts::task_user_data, this, llm_task_obj, llm_channel, std::placeholders::_1,
std::placeholders::_2));
} else if (input.find("llm") != std::string::npos) {
} else if ((input.find("llm") != std::string::npos) || (input.find("vlm") != std::string::npos)) {
llm_channel->subscriber_work_id(input,
std::bind(&llm_tts::task_user_data, this, llm_task_obj, llm_channel,
std::placeholders::_1, std::placeholders::_2));
@@ -383,7 +383,7 @@ class llm_tts : public StackFlow {
}
auto llm_channel = get_channel(work_id);
auto llm_task_obj = llm_task_[work_id_num];
if (data.find("llm") != std::string::npos) {
if ((data.find("llm") != std::string::npos) || (data.find("vlm") != std::string::npos)) {
ret = llm_channel->subscriber_work_id(
data, std::bind(&llm_tts::task_user_data, this, llm_task_obj, llm_channel, std::placeholders::_1,
std::placeholders::_2));
@@ -141,7 +141,6 @@ class llm_task {
tokenizer_server_flage_ = true;
SLOGI("port_=%s model_id=%s content=%s", std::to_string(port_).c_str(), (base_model + "tokenizer").c_str(), ("'" + prompt_ + "'").c_str());
std::this_thread::sleep_for(std::chrono::seconds(10));
// return -1;
}
} else {
mode_config_.filename_tokenizer_model = base_model + mode_config_.filename_tokenizer_model;