mirror of
				https://github.com/kardolus/chatgpt-cli.git
				synced 2024-09-08 23:15:00 +03:00 
			
		
		
		
	Add additional configuration options
- This includes temperature, top_p, frequency_penalty and presence_penalty
This commit is contained in:
		| @@ -1,9 +1,13 @@ | ||||
| package types | ||||
|  | ||||
| type CompletionsRequest struct { | ||||
| 	Model    string    `json:"model"` | ||||
| 	Messages []Message `json:"messages"` | ||||
| 	Stream   bool      `json:"stream"` | ||||
| 	Model            string    `json:"model"` | ||||
| 	Temperature      float64   `json:"temperature"` | ||||
| 	TopP             float64   `json:"top_p"` | ||||
| 	FrequencyPenalty float64   `json:"frequency_penalty"` | ||||
| 	PresencePenalty  float64   `json:"presence_penalty"` | ||||
| 	Messages         []Message `json:"messages"` | ||||
| 	Stream           bool      `json:"stream"` | ||||
| } | ||||
|  | ||||
| type Message struct { | ||||
| @@ -31,11 +35,15 @@ type Choice struct { | ||||
| } | ||||
|  | ||||
| type Data struct { | ||||
| 	ID      string `json:"id"` | ||||
| 	Object  string `json:"object"` | ||||
| 	Created int    `json:"created"` | ||||
| 	Model   string `json:"model"` | ||||
| 	Choices []struct { | ||||
| 	ID               string  `json:"id"` | ||||
| 	Object           string  `json:"object"` | ||||
| 	Created          int     `json:"created"` | ||||
| 	Model            string  `json:"model"` | ||||
| 	Temperature      float64 `json:"temperature"` | ||||
| 	TopP             float64 `json:"top_p"` | ||||
| 	FrequencyPenalty float64 `json:"frequency_penalty"` | ||||
| 	PresencePenalty  float64 `json:"presence_penalty"` | ||||
| 	Choices          []struct { | ||||
| 		Delta        map[string]string `json:"delta"` | ||||
| 		Index        int               `json:"index"` | ||||
| 		FinishReason string            `json:"finish_reason"` | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 kardolus
					kardolus