Skip to content

Commit

Permalink
fix: use executor API
Browse files Browse the repository at this point in the history
  • Loading branch information
sangjanai committed Aug 1, 2024
1 parent 163b3c0 commit ce07bdb
Show file tree
Hide file tree
Showing 4 changed files with 292 additions and 229 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int main(int argc, char** argv) {
};
resp.set_chunked_content_provider("text/event-stream",
chunked_content_provider,
[](bool) { LOG_INFO << "Done"; });
[](bool) { });
};

const auto handle_load_model = [&](const httplib::Request& req,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace tensorrtllm::model {
struct LoadModelRequest {
int ctx_len = 2048;
int n_parallel = 1;
int batch_size = 1;
std::string model_path;
std::string user_prompt = "";
std::string ai_prompt = "";
Expand All @@ -18,6 +19,7 @@ inline LoadModelRequest fromJson(std::shared_ptr<Json::Value> json_body) {
if (json_body) {
request.ctx_len = json_body->get("ctx_len", 2048).asInt();
request.n_parallel = json_body->get("n_parallel", 1).asInt();
request.batch_size = json_body->get("batch_size", 1).asInt();
request.model_path = json_body->get("model_path", "").asString();
request.user_prompt = json_body->get("user_prompt", "").asString();
request.ai_prompt = json_body->get("ai_prompt", "").asString();
Expand Down
Loading

0 comments on commit ce07bdb

Please sign in to comment.