mirror of
https://github.com/mii443/openai-api-rs.git
synced 2025-09-01 14:49:26 +00:00
Add chat gpt api
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
use serde::{Serialize, Deserialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct FileData{
|
||||
pub id: String,
|
||||
pub struct FileData {
|
||||
pub id: String,
|
||||
pub oejct: String,
|
||||
pub bytes: i32,
|
||||
pub created_at: i64,
|
||||
@ -13,10 +13,9 @@ pub struct FileData{
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct FileListResponse {
|
||||
pub object: String,
|
||||
pub data: Vec<FileData>,
|
||||
pub data: Vec<FileData>,
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
pub struct FileUploadRequest {
|
||||
pub file: String,
|
||||
@ -33,7 +32,6 @@ pub struct FileUploadResponse {
|
||||
pub purpose: String,
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
pub struct FileDeleteRequest {
|
||||
pub file_id: String,
|
||||
@ -61,7 +59,6 @@ pub struct FileRetrieveResponse {
|
||||
pub purpose: String,
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
pub struct FileRetrieveContentRequest {
|
||||
pub file_id: String,
|
||||
|
Reference in New Issue
Block a user