2024-03-01 15:19:53 +00:00
|
|
|
package schema
|
2023-07-14 23:19:43 +00:00
|
|
|
|
|
|
|
type PredictionOptions struct {
|
|
|
|
|
|
|
|
// Also part of the OpenAI official spec
|
|
|
|
Model string `json:"model" yaml:"model"`
|
|
|
|
|
|
|
|
// Also part of the OpenAI official spec
|
|
|
|
Language string `json:"language"`
|
|
|
|
|
2024-06-24 17:21:22 +00:00
|
|
|
// Only for audio transcription
|
|
|
|
Translate bool `json:"translate"`
|
|
|
|
|
2023-07-14 23:19:43 +00:00
|
|
|
// Also part of the OpenAI official spec. use it for returning multiple results
|
|
|
|
N int `json:"n"`
|
|
|
|
|
|
|
|
// Common options between all the API calls, part of the OpenAI spec
|
2024-03-13 09:05:30 +00:00
|
|
|
TopP *float64 `json:"top_p" yaml:"top_p"`
|
|
|
|
TopK *int `json:"top_k" yaml:"top_k"`
|
|
|
|
Temperature *float64 `json:"temperature" yaml:"temperature"`
|
|
|
|
Maxtokens *int `json:"max_tokens" yaml:"max_tokens"`
|
|
|
|
Echo bool `json:"echo"`
|
2023-07-14 23:19:43 +00:00
|
|
|
|
|
|
|
// Custom parameters - not present in the OpenAI API
|
|
|
|
Batch int `json:"batch" yaml:"batch"`
|
|
|
|
IgnoreEOS bool `json:"ignore_eos" yaml:"ignore_eos"`
|
|
|
|
RepeatPenalty float64 `json:"repeat_penalty" yaml:"repeat_penalty"`
|
|
|
|
Keep int `json:"n_keep" yaml:"n_keep"`
|
|
|
|
|
2024-04-06 20:56:45 +00:00
|
|
|
FrequencyPenalty float64 `json:"frequency_penalty" yaml:"frequency_penalty"`
|
|
|
|
PresencePenalty float64 `json:"presence_penalty" yaml:"presence_penalty"`
|
|
|
|
TFZ *float64 `json:"tfz" yaml:"tfz"`
|
2023-07-14 23:19:43 +00:00
|
|
|
|
2024-04-06 20:56:45 +00:00
|
|
|
TypicalP *float64 `json:"typical_p" yaml:"typical_p"`
|
|
|
|
Seed *int `json:"seed" yaml:"seed"`
|
2023-07-25 17:05:27 +00:00
|
|
|
|
|
|
|
NegativePrompt string `json:"negative_prompt" yaml:"negative_prompt"`
|
|
|
|
RopeFreqBase float32 `json:"rope_freq_base" yaml:"rope_freq_base"`
|
|
|
|
RopeFreqScale float32 `json:"rope_freq_scale" yaml:"rope_freq_scale"`
|
|
|
|
NegativePromptScale float32 `json:"negative_prompt_scale" yaml:"negative_prompt_scale"`
|
2023-08-07 23:10:05 +00:00
|
|
|
// AutoGPTQ
|
|
|
|
UseFastTokenizer bool `json:"use_fast_tokenizer" yaml:"use_fast_tokenizer"`
|
2023-08-17 21:38:59 +00:00
|
|
|
|
|
|
|
// Diffusers
|
|
|
|
ClipSkip int `json:"clip_skip" yaml:"clip_skip"`
|
2023-08-22 16:48:06 +00:00
|
|
|
|
|
|
|
// RWKV (?)
|
|
|
|
Tokenizer string `json:"tokenizer" yaml:"tokenizer"`
|
2023-07-14 23:19:43 +00:00
|
|
|
}
|