feat(openai): retrieve uploaded file metadata

This commit is contained in:
NgoQuocViet2001
2026-05-02 14:33:42 +07:00
parent 3d52040b3b
commit 36d0239dc6
10 changed files with 133 additions and 9 deletions

View File

@@ -99,6 +99,7 @@ func NewApp() (*App, error) {
r.Post("/v1/responses", responsesHandler.Responses)
r.Get("/v1/responses/{response_id}", responsesHandler.GetResponseByID)
r.Post("/v1/files", filesHandler.UploadFile)
r.Get("/v1/files/{file_id}", filesHandler.RetrieveFile)
r.Post("/v1/embeddings", embeddingsHandler.Embeddings)
// Root OpenAI aliases support clients configured with the bare DS2API service URL.
r.Get("/models", modelsHandler.ListModels)
@@ -107,6 +108,7 @@ func NewApp() (*App, error) {
r.Post("/responses", responsesHandler.Responses)
r.Get("/responses/{response_id}", responsesHandler.GetResponseByID)
r.Post("/files", filesHandler.UploadFile)
r.Get("/files/{file_id}", filesHandler.RetrieveFile)
r.Post("/embeddings", embeddingsHandler.Embeddings)
claude.RegisterRoutes(r, claudeHandler)
gemini.RegisterRoutes(r, geminiHandler)

View File

@@ -36,6 +36,7 @@ func TestAPIRoutesRemainRegistered(t *testing.T) {
"POST /v1/responses",
"GET /v1/responses/{response_id}",
"POST /v1/files",
"GET /v1/files/{file_id}",
"POST /v1/embeddings",
"GET /models",
"GET /models/{model_id}",
@@ -43,6 +44,7 @@ func TestAPIRoutesRemainRegistered(t *testing.T) {
"POST /responses",
"GET /responses/{response_id}",
"POST /files",
"GET /files/{file_id}",
"POST /embeddings",
"GET /anthropic/v1/models",
"POST /anthropic/v1/messages",