fix: include add_special_tokens in kserve request (#2859)
merging as this patch is already used, and fully limit to the kserve feature
This commit is contained in:
parent
ab5f616920
commit
23bc38b10d
|
@ -205,6 +205,7 @@ pub async fn kserve_model_infer(
|
||||||
let generate_request = GenerateRequest {
|
let generate_request = GenerateRequest {
|
||||||
inputs: str_input.to_string(),
|
inputs: str_input.to_string(),
|
||||||
parameters: payload.parameters.clone(),
|
parameters: payload.parameters.clone(),
|
||||||
|
add_special_tokens: true,
|
||||||
};
|
};
|
||||||
let infer = infer.clone();
|
let infer = infer.clone();
|
||||||
let compute_type = compute_type.clone();
|
let compute_type = compute_type.clone();
|
||||||
|
@ -212,7 +213,7 @@ pub async fn kserve_model_infer(
|
||||||
async move {
|
async move {
|
||||||
generate_internal(infer, compute_type, Json(generate_request), span)
|
generate_internal(infer, compute_type, Json(generate_request), span)
|
||||||
.await
|
.await
|
||||||
.map(|(_, Json(generation))| {
|
.map(|(_, _, Json(generation))| {
|
||||||
let generation_as_bytes = generation.generated_text.as_bytes().to_vec();
|
let generation_as_bytes = generation.generated_text.as_bytes().to_vec();
|
||||||
OutputChunk {
|
OutputChunk {
|
||||||
name: output.name.clone(),
|
name: output.name.clone(),
|
||||||
|
|
Loading…
Reference in New Issue