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
6d110304
Unverified
Commit
6d110304
authored
Mar 21, 2025
by
Patrick Devine
Committed by
GitHub
Mar 21, 2025
Browse files
fix: show correct bool value for kv in verbose show information (#9928)
parent
0ff28758
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
cmd/cmd.go
cmd/cmd.go
+2
-0
cmd/cmd_test.go
cmd/cmd_test.go
+4
-0
No files found.
cmd/cmd.go
View file @
6d110304
...
@@ -703,6 +703,8 @@ func showInfo(resp *api.ShowResponse, verbose bool, w io.Writer) error {
...
@@ -703,6 +703,8 @@ func showInfo(resp *api.ShowResponse, verbose bool, w io.Writer) error {
for
_
,
k
:=
range
keys
{
for
_
,
k
:=
range
keys
{
var
v
string
var
v
string
switch
vData
:=
resp
.
ModelInfo
[
k
]
.
(
type
)
{
switch
vData
:=
resp
.
ModelInfo
[
k
]
.
(
type
)
{
case
bool
:
v
=
fmt
.
Sprintf
(
"%t"
,
vData
)
case
string
:
case
string
:
v
=
vData
v
=
vData
case
float64
:
case
float64
:
...
...
cmd/cmd_test.go
View file @
6d110304
...
@@ -87,6 +87,8 @@ func TestShowInfo(t *testing.T) {
...
@@ -87,6 +87,8 @@ func TestShowInfo(t *testing.T) {
ModelInfo
:
map
[
string
]
any
{
ModelInfo
:
map
[
string
]
any
{
"general.architecture"
:
"test"
,
"general.architecture"
:
"test"
,
"general.parameter_count"
:
float64
(
8
_000_000_000
),
"general.parameter_count"
:
float64
(
8
_000_000_000
),
"some.true_bool"
:
true
,
"some.false_bool"
:
false
,
"test.context_length"
:
float64
(
1000
),
"test.context_length"
:
float64
(
1000
),
"test.embedding_length"
:
float64
(
11434
),
"test.embedding_length"
:
float64
(
11434
),
},
},
...
@@ -111,6 +113,8 @@ func TestShowInfo(t *testing.T) {
...
@@ -111,6 +113,8 @@ func TestShowInfo(t *testing.T) {
Metadata
Metadata
general.architecture test
general.architecture test
general.parameter_count 8e+09
general.parameter_count 8e+09
some.false_bool false
some.true_bool true
test.context_length 1000
test.context_length 1000
test.embedding_length 11434
test.embedding_length 11434
...
...
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