mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 12:24:53 +00:00
fix: adjust rebase removals
This commit is contained in:
parent
4fec982325
commit
593c443b45
@ -959,20 +959,6 @@ pub(crate) struct Details {
|
|||||||
pub top_tokens: Vec<Vec<Token>>,
|
pub top_tokens: Vec<Vec<Token>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Details {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self {
|
|
||||||
finish_reason: FinishReason::Length,
|
|
||||||
generated_tokens: 0,
|
|
||||||
seed: None,
|
|
||||||
prefill: Vec::new(),
|
|
||||||
tokens: Vec::new(),
|
|
||||||
best_of_sequences: None,
|
|
||||||
top_tokens: Vec::new(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Serialize, ToSchema)]
|
#[derive(Serialize, ToSchema)]
|
||||||
pub(crate) struct GenerateResponse {
|
pub(crate) struct GenerateResponse {
|
||||||
#[schema(example = "test")]
|
#[schema(example = "test")]
|
||||||
|
@ -551,7 +551,11 @@ async fn generate_stream_internal(
|
|||||||
path = "/v1/completions",
|
path = "/v1/completions",
|
||||||
request_body = CompletionRequest,
|
request_body = CompletionRequest,
|
||||||
responses(
|
responses(
|
||||||
(status = 200, description = "Generated Text", body = ChatCompletionChunk),
|
(status = 200, description = "Generated Chat Completion",
|
||||||
|
content(
|
||||||
|
("application/json" = Completion),
|
||||||
|
("text/event-stream" = CompletionCompleteChunk),
|
||||||
|
)),
|
||||||
(status = 424, description = "Generation Error", body = ErrorResponse,
|
(status = 424, description = "Generation Error", body = ErrorResponse,
|
||||||
example = json ! ({"error": "Request failed during generation"})),
|
example = json ! ({"error": "Request failed during generation"})),
|
||||||
(status = 429, description = "Model is overloaded", body = ErrorResponse,
|
(status = 429, description = "Model is overloaded", body = ErrorResponse,
|
||||||
@ -934,7 +938,11 @@ async fn completions(
|
|||||||
path = "/v1/chat/completions",
|
path = "/v1/chat/completions",
|
||||||
request_body = ChatRequest,
|
request_body = ChatRequest,
|
||||||
responses(
|
responses(
|
||||||
(status = 200, description = "Generated Text", body = ChatCompletionChunk),
|
(status = 200, description = "Generated Chat Completion",
|
||||||
|
content(
|
||||||
|
("application/json" = ChatCompletion),
|
||||||
|
("text/event-stream" = ChatCompletionChunk),
|
||||||
|
)),
|
||||||
(status = 424, description = "Generation Error", body = ErrorResponse,
|
(status = 424, description = "Generation Error", body = ErrorResponse,
|
||||||
example = json ! ({"error": "Request failed during generation"})),
|
example = json ! ({"error": "Request failed during generation"})),
|
||||||
(status = 429, description = "Model is overloaded", body = ErrorResponse,
|
(status = 429, description = "Model is overloaded", body = ErrorResponse,
|
||||||
|
Loading…
Reference in New Issue
Block a user