Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
0f541a03
Commit
0f541a03
authored
Aug 30, 2023
by
Michael Yang
Browse files
s/ListResponseModel/ModelResponse/
parent
bc3e21fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
api/types.go
api/types.go
+2
-2
server/routes.go
server/routes.go
+2
-2
No files found.
api/types.go
View file @
0f541a03
...
...
@@ -88,10 +88,10 @@ type PushRequest struct {
}
type
ListResponse
struct
{
Models
[]
List
Response
Model
`json:"models"`
Models
[]
Model
Response
`json:"models"`
}
type
List
Response
Model
struct
{
type
Model
Response
struct
{
Name
string
`json:"name"`
ModifiedAt
time
.
Time
`json:"modified_at"`
Size
int
`json:"size"`
...
...
server/routes.go
View file @
0f541a03
...
...
@@ -365,7 +365,7 @@ func DeleteModelHandler(c *gin.Context) {
}
func
ListModelsHandler
(
c
*
gin
.
Context
)
{
var
models
[]
api
.
List
Response
Model
var
models
[]
api
.
Model
Response
fp
,
err
:=
GetManifestPath
()
if
err
!=
nil
{
c
.
JSON
(
http
.
StatusInternalServerError
,
gin
.
H
{
"error"
:
err
.
Error
()})
...
...
@@ -398,7 +398,7 @@ func ListModelsHandler(c *gin.Context) {
log
.
Printf
(
"skipping file: %s"
,
fp
)
return
nil
}
model
:=
api
.
List
Response
Model
{
model
:=
api
.
Model
Response
{
Name
:
mp
.
GetShortTagname
(),
Size
:
manifest
.
GetTotalSize
(),
Digest
:
digest
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment