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
18527551
Unverified
Commit
18527551
authored
Oct 02, 2023
by
Patrick Devine
Committed by
GitHub
Oct 02, 2023
Browse files
show a default message when license/parameters/system prompt/template aren't specified (#681)
parent
b1f71233
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
+20
-4
cmd/cmd.go
cmd/cmd.go
+20
-4
No files found.
cmd/cmd.go
View file @
18527551
...
@@ -686,15 +686,31 @@ func generateInteractive(cmd *cobra.Command, model string) error {
...
@@ -686,15 +686,31 @@ func generateInteractive(cmd *cobra.Command, model string) error {
switch
args
[
1
]
{
switch
args
[
1
]
{
case
"license"
:
case
"license"
:
fmt
.
Println
(
resp
.
License
)
if
resp
.
License
==
""
{
fmt
.
Println
(
"No license was specified for this model.
\n
"
)
}
else
{
fmt
.
Println
(
resp
.
License
)
}
case
"modelfile"
:
case
"modelfile"
:
fmt
.
Println
(
resp
.
Modelfile
)
fmt
.
Println
(
resp
.
Modelfile
)
case
"parameters"
:
case
"parameters"
:
fmt
.
Println
(
resp
.
Parameters
)
if
resp
.
Parameters
==
""
{
fmt
.
Println
(
"No parameters were specified for this model.
\n
"
)
}
else
{
fmt
.
Println
(
resp
.
Parameters
)
}
case
"system"
:
case
"system"
:
fmt
.
Println
(
resp
.
System
)
if
resp
.
System
==
""
{
fmt
.
Println
(
"No system prompt was specified for this model.
\n
"
)
}
else
{
fmt
.
Println
(
resp
.
System
)
}
case
"template"
:
case
"template"
:
fmt
.
Println
(
resp
.
Template
)
if
resp
.
Template
==
""
{
fmt
.
Println
(
"No prompt template was specified for this model.
\n
"
)
}
else
{
fmt
.
Println
(
resp
.
Template
)
}
default
:
default
:
fmt
.
Printf
(
"Unknown command '/show %s'. Type /? for help
\n
"
,
args
[
1
])
fmt
.
Printf
(
"Unknown command '/show %s'. Type /? for help
\n
"
,
args
[
1
])
}
}
...
...
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