From 3d397d8aabf8f313b1b1d2cccfa939f7235a4d2c Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Fri, 16 May 2025 21:35:57 +0200 Subject: [PATCH] embedding: do not use oai type Signed-off-by: Ettore Di Giacinto --- backend/cpp/llama/grpc-server.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/cpp/llama/grpc-server.cpp b/backend/cpp/llama/grpc-server.cpp index cdf2ed75..89de0c35 100644 --- a/backend/cpp/llama/grpc-server.cpp +++ b/backend/cpp/llama/grpc-server.cpp @@ -4261,9 +4261,11 @@ public: body["stream"] = false; + /* if (llama_pooling_type(ctx_server.ctx) == LLAMA_POOLING_TYPE_NONE) { return grpc::Status(grpc::StatusCode::INVALID_ARGUMENT, "Pooling type 'none' is not OAI compatible. Please use a different pooling type"); } + */ // for the shape of input/content, see tokenize_input_prompts() json prompt = body.at("prompt"); @@ -4291,7 +4293,7 @@ public: task.prompt_tokens = server_tokens(tokenized_prompts[i], ctx_server.mctx != nullptr); // OAI-compat - task.params.oaicompat = OAICOMPAT_TYPE_EMBEDDING; + task.params.oaicompat = OAICOMPAT_TYPE_NONE; tasks.push_back(std::move(task)); }