-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShowModelRequestBuilder.go
49 lines (44 loc) · 1.3 KB
/
ShowModelRequestBuilder.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package ollama
// ShowModelRequestBuilder represents the model creation API request.
type ShowModelRequestBuilder struct {
Model *string `json:"model"`
System *string `json:"path"`
Template *string `json:"modelfile"`
Options *Options `json:"options"`
}
// WithModel sets the new model's name for this request.
//
// Parameters:
// - v: The model name.
func (f *ShowModelInfoFunc) WithModel(v string) func(*ShowModelRequestBuilder) {
return func(r *ShowModelRequestBuilder) {
r.Model = &v
}
}
// WithTemplate sets the template for this request.
//
// Parameters:
// - v: The template string.
func (f *ShowModelInfoFunc) WithTemplate(v string) func(*ShowModelRequestBuilder) {
return func(r *ShowModelRequestBuilder) {
r.Template = &v
}
}
// WithSystem sets the system for this request.
//
// Parameters:
// - v: The system message string.
func (f *ShowModelInfoFunc) WithSystem(v string) func(*ShowModelRequestBuilder) {
return func(r *ShowModelRequestBuilder) {
r.System = &v
}
}
// WithOptions sets the options for this request. It will override any settings set before, such as temperature and seed.
//
// Parameters:
// - v: The options to set.
func (f *ShowModelInfoFunc) WithOptions(v Options) func(*ShowModelRequestBuilder) {
return func(r *ShowModelRequestBuilder) {
r.Options = &v
}
}