Skip to content

Commit a84098d

Browse files
authored
Add missing object type to /v1/models endpoint (#154)
1 parent 4d02ccd commit a84098d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

proxy/proxymanager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ func (pm *ProxyManager) listModelsHandler(c *gin.Context) {
291291
}
292292

293293
// Encode the data as JSON and write it to the response writer
294-
if err := json.NewEncoder(c.Writer).Encode(map[string]interface{}{"data": data}); err != nil {
294+
if err := json.NewEncoder(c.Writer).Encode(map[string]interface{}{"object": "list", "data": data}); err != nil {
295295
pm.sendErrorResponse(c, http.StatusInternalServerError, fmt.Sprintf("error encoding JSON %s", err.Error()))
296296
return
297297
}

0 commit comments

Comments
 (0)