move enum stop_type to server-task

This commit is contained in:
Xuan Son Nguyen 2025-11-18 17:28:21 +01:00
parent ca993bad51
commit 625010d42d
2 changed files with 7 additions and 10 deletions

View File

@ -59,13 +59,6 @@ static T json_value(const json & body, const std::string & key, const T & defaul
} }
} }
enum stop_type {
STOP_TYPE_NONE,
STOP_TYPE_EOS,
STOP_TYPE_WORD,
STOP_TYPE_LIMIT,
};
// https://community.openai.com/t/openai-chat-list-of-error-codes-and-types/357791/11 // https://community.openai.com/t/openai-chat-list-of-error-codes-and-types/357791/11
enum error_type { enum error_type {
ERROR_TYPE_INVALID_REQUEST, ERROR_TYPE_INVALID_REQUEST,

View File

@ -2,9 +2,6 @@
#include "common.h" #include "common.h"
#include "llama.h" #include "llama.h"
#include "chat.h"
#include "sampling.h"
#include "json-schema-to-grammar.h"
#include <string> #include <string>
#include <unordered_set> #include <unordered_set>
@ -37,6 +34,13 @@ enum oaicompat_type {
OAICOMPAT_TYPE_EMBEDDING, OAICOMPAT_TYPE_EMBEDDING,
}; };
enum stop_type {
STOP_TYPE_NONE,
STOP_TYPE_EOS,
STOP_TYPE_WORD,
STOP_TYPE_LIMIT,
};
struct task_params { struct task_params {
bool stream = true; bool stream = true;
bool include_usage = false; bool include_usage = false;