mirror of
https://github.com/ollama/ollama.git
synced 2025-07-28 19:12:44 +02:00
Fixed the API endpoint /api/tags when the model list is empty. (#4424)
* Fixed the API endpoint /api/tags to return {models: []} instead of {models: null} when the model list is empty. * Update server/routes.go --------- Co-authored-by: Jeffrey Morgan <jmorganca@gmail.com>
This commit is contained in:
@@ -95,6 +95,7 @@ func Test_Routes(t *testing.T) {
|
||||
err = json.Unmarshal(body, &modelList)
|
||||
assert.Nil(t, err)
|
||||
|
||||
assert.NotNil(t, modelList.Models)
|
||||
assert.Equal(t, 0, len(modelList.Models))
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user