Skip to content

Commit

Permalink
update comments in cha
Browse files Browse the repository at this point in the history
  • Loading branch information
conneroisu committed Sep 6, 2024
1 parent d635e82 commit 776edd9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
29 changes: 13 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -493,22 +493,19 @@ type ChatCompletionRequest struct {
// If true, returns the log probabilities of each output token returned in the content of message.
// This option is currently not available on the gpt-4-vision-preview model.
LogProbs bool `json:"logprobs,omitempty"`
// TopLogProbs is an integer between 0 and 5 specifying the number of most likely tokens to return at each
// token position, each with an associated log probability.
// logprobs must be set to true if this parameter is used.
TopLogProbs int `json:"top_logprobs,omitempty"`
User string `json:"user,omitempty"`
// Deprecated: use Tools instead.
Functions []FunctionDefinition `json:"functions,omitempty"`
// Deprecated: use ToolChoice instead.
FunctionCall any `json:"function_call,omitempty"`
Tools []Tool `json:"tools,omitempty"`
// This can be either a string or an ToolChoice object.
ToolChoice any `json:"tool_choice,omitempty"`
// Options for streaming response. Only set this when you set stream: true.
StreamOptions *StreamOptions `json:"stream_options,omitempty"`
// Disable the default behavior of parallel tool calls by setting it: false.
ParallelToolCalls any `json:"parallel_tool_calls,omitempty"`
// TopLogProbs is an integer between 0 and 5 specifying the number of most
// likely tokens to return at each // token position, each with an
// associated log probability. LogProbs must be set to true if this
// parameter is used.
TopLogProbs int `json:"top_logprobs,omitempty"` // TopLogProbs is the top log probs of the chat completion message.
User string `json:"user,omitempty"` // User is the user of the chat completion message.
Tools []Tool `json:"tools,omitempty"` // Tools is the tools of the chat completion message.
ToolChoice any `json:"tool_choice,omitempty"` // ToolChoice is the tool choice of the chat completion message.
StreamOptions *StreamOptions `json:"stream_options,omitempty"` // StreamOptions is the stream options of the chat completion message. Only set this when you set stream: true.
// ParallelToolCalls is the parallel tool calls of the chat completion message.
//
// bool
ParallelToolCalls any `json:"parallel_tool_calls,omitempty"`
}
```

Expand Down
9 changes: 2 additions & 7 deletions chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,8 @@ type ChatCompletionRequest struct {
// logprobs must be set to true if this parameter is used.
TopLogProbs int `json:"top_logprobs,omitempty"`
User string `json:"user,omitempty"`
// Deprecated: use Tools instead.
Functions []FunctionDefinition `json:"functions,omitempty"`
// Deprecated: use ToolChoice instead.
FunctionCall any `json:"function_call,omitempty"`
Tools []Tool `json:"tools,omitempty"`
// This can be either a string or an ToolChoice object.
ToolChoice any `json:"tool_choice,omitempty"`
Tools []Tool `json:"tools,omitempty"` // Tools is the tools of the chat completion message.
ToolChoice any `json:"tool_choice,omitempty"` // ToolChoice is the tool choice of the chat completion message.
// Options for streaming response. Only set this when you set stream: true.
StreamOptions *StreamOptions `json:"stream_options,omitempty"`
// Disable the default behavior of parallel tool calls by setting it: false.
Expand Down

0 comments on commit 776edd9

Please sign in to comment.