@@ -267,24 +267,6 @@ pub struct FunctionDefinition {
pub parameters: Option<Value>,
}
-#[derive(Debug, Serialize, Deserialize)]
-pub struct CompletionRequest {
- pub model: String,
- pub prompt: String,
- pub max_tokens: u32,
- pub temperature: f32,
- #[serde(default, skip_serializing_if = "Option::is_none")]
- pub prediction: Option<Prediction>,
- #[serde(default, skip_serializing_if = "Option::is_none")]
- pub rewrite_speculation: Option<bool>,
-}
-
-#[derive(Clone, Deserialize, Serialize, Debug)]
-#[serde(tag = "type", rename_all = "snake_case")]
-pub enum Prediction {
- Content { content: String },
-}
-
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum ToolChoice {
@@ -397,21 +379,6 @@ pub struct FunctionContent {
pub arguments: String,
}
-#[derive(Serialize, Deserialize, Debug)]
-pub struct CompletionChoice {
- pub text: String,
-}
-
-#[derive(Serialize, Deserialize, Debug)]
-pub struct Response {
- pub id: String,
- pub object: String,
- pub created: u64,
- pub model: String,
- pub choices: Vec<Choice>,
- pub usage: Usage,
-}
-
#[derive(Serialize, Deserialize, Debug)]
pub struct Usage {
pub prompt_tokens: u64,
@@ -419,13 +386,6 @@ pub struct Usage {
pub total_tokens: u64,
}
-#[derive(Serialize, Deserialize, Debug)]
-pub struct Choice {
- pub index: u32,
- pub message: RequestMessage,
- pub finish_reason: Option<String>,
-}
-
#[derive(Serialize, Deserialize, Debug)]
pub struct StreamResponse {
pub id: String,