Add chat gpt api

This commit is contained in:
Dongri Jin
2023-03-02 12:20:01 +09:00
parent 6c809911f4
commit 6a68775555
13 changed files with 290 additions and 191 deletions

View File

@ -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,