api: remove unused RetrieveModelResponse type (#10603)
This commit is contained in:
parent
af31ccefc0
commit
392de84031
@ -466,13 +466,6 @@ type ProcessModelResponse struct {
|
||||
SizeVRAM int64 `json:"size_vram"`
|
||||
}
|
||||
|
||||
type RetrieveModelResponse struct {
|
||||
Id string `json:"id"`
|
||||
Object string `json:"object"`
|
||||
Created int64 `json:"created"`
|
||||
OwnedBy string `json:"owned_by"`
|
||||
}
|
||||
|
||||
type TokenResponse struct {
|
||||
Token string `json:"token"`
|
||||
}
|
||||
|
@ -474,14 +474,14 @@ func TestRoutes(t *testing.T) {
|
||||
t.Fatalf("failed to read response body: %v", err)
|
||||
}
|
||||
|
||||
var retrieveResp api.RetrieveModelResponse
|
||||
err = json.Unmarshal(body, &retrieveResp)
|
||||
var m openai.Model
|
||||
err = json.Unmarshal(body, &m)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to unmarshal response body: %v", err)
|
||||
}
|
||||
|
||||
if retrieveResp.Id != "show-model" || retrieveResp.OwnedBy != "library" {
|
||||
t.Errorf("expected model 'show-model' owned by 'library', got %v", retrieveResp)
|
||||
if m.Id != "show-model" || m.OwnedBy != "library" {
|
||||
t.Errorf("expected model 'show-model' owned by 'library', got %v", m)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user