mirror of
https://github.com/mii443/openai-api-rs.git
synced 2025-09-01 14:49:26 +00:00
Adding ability to deserialize requests
This commit is contained in:
@ -6,14 +6,14 @@ use std::collections::HashMap;
|
||||
use crate::impl_builder_methods;
|
||||
use crate::v1::common;
|
||||
|
||||
#[derive(Debug, Serialize, Clone, PartialEq, Eq)]
|
||||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)]
|
||||
pub enum ToolChoiceType {
|
||||
None,
|
||||
Auto,
|
||||
ToolChoice { tool: Tool },
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Clone)]
|
||||
#[derive(Debug, Serialize, Deserialze, Clone)]
|
||||
pub struct ChatCompletionRequest {
|
||||
pub model: String,
|
||||
pub messages: Vec<ChatCompletionMessage>,
|
||||
|
@ -18,7 +18,7 @@ pub const GPT3_CURIE: &str = "curie";
|
||||
pub const GPT3_ADA: &str = "ada";
|
||||
pub const GPT3_BABBAGE: &str = "babbage";
|
||||
|
||||
#[derive(Debug, Serialize, Clone)]
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct CompletionRequest {
|
||||
pub model: String,
|
||||
pub prompt: String,
|
||||
|
Reference in New Issue
Block a user