Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ add_executable(${PROJECT_NAME} main.cc)
#
# and comment out the following lines
find_package(Drogon CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE Drogon::Drogon common llama clip
target_link_libraries(${PROJECT_NAME} PRIVATE Drogon::Drogon common llama llava
${CMAKE_THREAD_LIBS_INIT})

# ##############################################################################
Expand Down
8 changes: 4 additions & 4 deletions controllers/llamaCPP.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void llamaCPP::chatCompletion(
data["stop"] = stopWords;
}

const int task_id = llama.request_completion(data, false);
const int task_id = llama.request_completion(data, false,false);
LOG_INFO << "Resolved request for task_id:" << task_id;

auto state = createState(task_id, this);
Expand Down Expand Up @@ -178,7 +178,7 @@ void llamaCPP::embedding(
prompt = "";
}
const int task_id =
llama.request_completion({{"prompt", prompt}, {"n_predict", 0}}, false);
llama.request_completion({{"prompt", prompt}, {"n_predict", 0}}, false, true);
task_result result = llama.next_result(task_id);
std::string embeddingResp = result.result_json.dump();
auto resp = nitro_utils::nitroHttpResponse();
Expand Down Expand Up @@ -226,8 +226,8 @@ void llamaCPP::loadModel(

llama_backend_init(params.numa);

LOG_INFO_LLAMA("build info",
{{"build", BUILD_NUMBER}, {"commit", BUILD_COMMIT}});
// LOG_INFO_LLAMA("build info",
// {{"build", BUILD_NUMBER}, {"commit", BUILD_COMMIT}});
LOG_INFO_LLAMA("system info",
{
{"n_threads", params.n_threads},
Expand Down
Loading