Add omitempty to optional fields in AnswerRequest struct (#11)
This commit is contained in:
10
answers.go
10
answers.go
@@ -8,15 +8,15 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type AnswerRequest struct {
|
type AnswerRequest struct {
|
||||||
Documents []string `json:"documents"`
|
Documents []string `json:"documents,omitempty"`
|
||||||
File string `json:"file"`
|
File string `json:"file,omitempty"`
|
||||||
Question string `json:"question"`
|
Question string `json:"question"`
|
||||||
SearchModel string `json:"search_model"`
|
SearchModel string `json:"search_model,omitempty"`
|
||||||
Model string `json:"model"`
|
Model string `json:"model"`
|
||||||
ExamplesContext string `json:"examples_context"`
|
ExamplesContext string `json:"examples_context"`
|
||||||
Examples [][]string `json:"examples"`
|
Examples [][]string `json:"examples"`
|
||||||
MaxTokens int `json:"max_tokens"`
|
MaxTokens int `json:"max_tokens,omitempty"`
|
||||||
Stop []string `json:"stop"`
|
Stop []string `json:"stop,omitempty"`
|
||||||
Temperature *float64 `json:"temperature,omitempty"`
|
Temperature *float64 `json:"temperature,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user