avoid to get prompt in infill mode and embedding mode
This commit is contained in:
parent
9f773486ab
commit
2992479a42
1 changed files with 14 additions and 11 deletions
|
@ -901,6 +901,7 @@ struct server_context {
|
||||||
slot.params.input_suffix = json_value(data, "input_suffix", default_params.input_suffix);
|
slot.params.input_suffix = json_value(data, "input_suffix", default_params.input_suffix);
|
||||||
|
|
||||||
// get prompt
|
// get prompt
|
||||||
|
if (!(task.infill || task.embedding)) {
|
||||||
{
|
{
|
||||||
const auto & prompt = data.find("prompt");
|
const auto & prompt = data.find("prompt");
|
||||||
if (prompt == data.end()) {
|
if (prompt == data.end()) {
|
||||||
|
@ -914,6 +915,8 @@ struct server_context {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// penalize user-provided tokens
|
// penalize user-provided tokens
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue