Skip to content

Commit

Permalink
chat: rename isFunctionCall function to be more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanskidmore committed Jun 26, 2023
1 parent 43f37ad commit f20437c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ type ChatCompletionRequest struct {
FunctionCall any `json:"function_call,omitempty"`
}

func checkFunctionCall(value any) bool {
func checkIsChatCompletionFunctionCall(value any) bool {
if value == nil {
return true
}
Expand Down Expand Up @@ -146,7 +146,7 @@ func (c *Client) CreateChatCompletion(
return
}

if !checkFunctionCall(request.FunctionCall) {
if !checkIsChatCompletionFunctionCall(request.FunctionCall) {
err = ErrChatCompletionInvalidFunctionCall
return
}
Expand Down

0 comments on commit f20437c

Please sign in to comment.