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
1ebdbd96
"llama/llama.cpp/src/llama-sampling.cpp" did not exist on "527cc9789995bf3125bc310bfff19eecbfd6c9a0"
Commit
1ebdbd96
authored
Oct 12, 2023
by
Michael Yang
Browse files
server: add version handler
parent
5c59455b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
server/routes.go
server/routes.go
+3
-0
No files found.
server/routes.go
View file @
1ebdbd96
...
@@ -782,6 +782,9 @@ func Serve(ln net.Listener, allowOrigins []string) error {
...
@@ -782,6 +782,9 @@ func Serve(ln net.Listener, allowOrigins []string) error {
})
})
r
.
Handle
(
method
,
"/api/tags"
,
ListModelsHandler
)
r
.
Handle
(
method
,
"/api/tags"
,
ListModelsHandler
)
r
.
Handle
(
method
,
"/api/version"
,
func
(
c
*
gin
.
Context
)
{
c
.
JSON
(
http
.
StatusOK
,
gin
.
H
{
"version"
:
version
.
Version
})
})
}
}
log
.
Printf
(
"Listening on %s (version %s)"
,
ln
.
Addr
(),
version
.
Version
)
log
.
Printf
(
"Listening on %s (version %s)"
,
ln
.
Addr
(),
version
.
Version
)
...
...
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