mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 02:24:59 +00:00
docs(swagger): core more localai/openai endpoints (#2904)
* docs(swagger): core more localai/openai endpoints Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix swagger descriptions for backend_monitor.go Signed-off-by: Dave <dave@gray101.com> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Signed-off-by: Dave <dave@gray101.com> Co-authored-by: Dave <dave@gray101.com>
This commit is contained in:
parent
6de12c694a
commit
b8b0c7ad0b
8 changed files with 100 additions and 63 deletions
|
@ -2,6 +2,7 @@ package schema
|
|||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
functions "github.com/mudler/LocalAI/pkg/functions"
|
||||
)
|
||||
|
@ -99,6 +100,37 @@ type OpenAIModel struct {
|
|||
Object string `json:"object"`
|
||||
}
|
||||
|
||||
type DeleteAssistantResponse struct {
|
||||
ID string `json:"id"`
|
||||
Object string `json:"object"`
|
||||
Deleted bool `json:"deleted"`
|
||||
}
|
||||
|
||||
// File represents the structure of a file object from the OpenAI API.
|
||||
type File struct {
|
||||
ID string `json:"id"` // Unique identifier for the file
|
||||
Object string `json:"object"` // Type of the object (e.g., "file")
|
||||
Bytes int `json:"bytes"` // Size of the file in bytes
|
||||
CreatedAt time.Time `json:"created_at"` // The time at which the file was created
|
||||
Filename string `json:"filename"` // The name of the file
|
||||
Purpose string `json:"purpose"` // The purpose of the file (e.g., "fine-tune", "classifications", etc.)
|
||||
}
|
||||
|
||||
type ListFiles struct {
|
||||
Data []File
|
||||
Object string
|
||||
}
|
||||
|
||||
type AssistantFileRequest struct {
|
||||
FileID string `json:"file_id"`
|
||||
}
|
||||
|
||||
type DeleteAssistantFileResponse struct {
|
||||
ID string `json:"id"`
|
||||
Object string `json:"object"`
|
||||
Deleted bool `json:"deleted"`
|
||||
}
|
||||
|
||||
type ImageGenerationResponseFormat string
|
||||
|
||||
type ChatCompletionResponseFormatType string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue