This commit is contained in:
Nicolas Patry 2024-01-26 13:20:46 +00:00
parent beca6c92f1
commit 52df1f5a37
2 changed files with 6 additions and 6 deletions

View File

@ -362,7 +362,7 @@ pub(crate) struct ChatRequest {
/// How many chat completion choices to generate for each input message. Note that you will be charged based on the /// How many chat completion choices to generate for each input message. Note that you will be charged based on the
/// number of generated tokens across all of the choices. Keep n as 1 to minimize costs. /// number of generated tokens across all of the choices. Keep n as 1 to minimize costs.
#[serde(default)] #[serde(default)]
#[schema(nullable=true, example = "2")] #[schema(nullable = true, example = "2")]
pub n: Option<u32>, pub n: Option<u32>,
/// UNUSED /// UNUSED
@ -472,7 +472,7 @@ pub struct SimpleToken {
#[derive(Serialize, ToSchema)] #[derive(Serialize, ToSchema)]
#[serde(rename_all(serialize = "snake_case"))] #[serde(rename_all(serialize = "snake_case"))]
#[schema(example="Length")] #[schema(example = "Length")]
pub(crate) enum FinishReason { pub(crate) enum FinishReason {
#[schema(rename = "length")] #[schema(rename = "length")]
Length, Length,

View File

@ -3,10 +3,10 @@ use crate::health::Health;
use crate::infer::{InferError, InferResponse, InferStreamResponse}; use crate::infer::{InferError, InferResponse, InferStreamResponse};
use crate::validation::ValidationError; use crate::validation::ValidationError;
use crate::{ use crate::{
BestOfSequence, ChatCompletion, ChatCompletionChunk, ChatRequest, CompatGenerateRequest, BestOfSequence, ChatCompletion, ChatCompletionChoice, ChatCompletionChunk, ChatCompletionDelta,
Details, ErrorResponse, FinishReason, GenerateParameters, GenerateRequest, GenerateResponse, ChatRequest, CompatGenerateRequest, Details, ErrorResponse, FinishReason, GenerateParameters,
HubModelInfo, HubTokenizerConfig, Infer, Info, PrefillToken, SimpleToken, StreamDetails, TokenizeResponse, GenerateRequest, GenerateResponse, HubModelInfo, HubTokenizerConfig, Infer, Info, Message,
StreamResponse, Token, Validation, Message, ChatCompletionChoice, ChatCompletionDelta PrefillToken, SimpleToken, StreamDetails, StreamResponse, Token, TokenizeResponse, Validation,
}; };
use axum::extract::Extension; use axum::extract::Extension;
use axum::http::{HeaderMap, Method, StatusCode}; use axum::http::{HeaderMap, Method, StatusCode};