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
8e6da3cb
Commit
8e6da3cb
authored
Aug 27, 2024
by
Michael Yang
Browse files
update deprecated warnings
parent
d9d50c43
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
.golangci.yaml
.golangci.yaml
+4
-0
api/types.go
api/types.go
+9
-7
No files found.
.golangci.yaml
View file @
8e6da3cb
...
...
@@ -32,6 +32,10 @@ linters:
linters-settings
:
gci
:
sections
:
[
standard
,
default
,
localmodule
]
staticcheck
:
checks
:
-
all
-
-SA1019
# omit Deprecated check
severity
:
default-severity
:
error
rules
:
...
...
api/types.go
View file @
8e6da3cb
...
...
@@ -296,15 +296,17 @@ type EmbeddingResponse struct {
// CreateRequest is the request passed to [Client.Create].
type
CreateRequest
struct
{
Model
string
`json:"model"`
Path
string
`json:"path"`
Modelfile
string
`json:"modelfile"`
Stream
*
bool
`json:"stream,omitempty"`
Quantize
string
`json:"quantize,omitempty"`
//
Name is d
eprecated
,
se
e Model
//
D
eprecated
:
se
t the model name with Model instead
Name
string
`json:"name"`
// Quantization is deprecated, see Quantize
// Deprecated: set the file content with Modelfile instead
Path
string
`json:"path"`
// Deprecated: use Quantize instead
Quantization
string
`json:"quantization,omitempty"`
}
...
...
@@ -312,7 +314,7 @@ type CreateRequest struct {
type
DeleteRequest
struct
{
Model
string
`json:"model"`
//
Name is d
eprecated
,
se
e Model
//
D
eprecated
:
se
t the model name with Model instead
Name
string
`json:"name"`
}
...
...
@@ -327,7 +329,7 @@ type ShowRequest struct {
Options
map
[
string
]
interface
{}
`json:"options"`
//
Name is d
eprecated
,
se
e Model
//
D
eprecated
:
se
t the model name with Model instead
Name
string
`json:"name"`
}
...
...
@@ -359,7 +361,7 @@ type PullRequest struct {
Password
string
`json:"password"`
Stream
*
bool
`json:"stream,omitempty"`
//
Name is d
eprecated
,
se
e Model
//
D
eprecated
:
se
t the model name with Model instead
Name
string
`json:"name"`
}
...
...
@@ -380,7 +382,7 @@ type PushRequest struct {
Password
string
`json:"password"`
Stream
*
bool
`json:"stream,omitempty"`
//
Name is d
eprecated
,
se
e Model
//
D
eprecated
:
se
t the model name with Model instead
Name
string
`json:"name"`
}
...
...
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