Skip to content

Conversation

mrene
Copy link
Contributor

@mrene mrene commented Oct 17, 2023

Fixes #37

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ This pull request was sent to the PullRequest network.


@mrene you can click here to see the review status or cancel the code review job.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PullRequest Breakdown

Reviewable lines of change

+ 3
- 3

100% Go

Type of change

Fix - These changes are likely to be fixing a bug or issue.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a simple enough change. I did make a comment about things to watch out for in other parts of the application, though.

Image of Andy W Andy W


Reviewed with ❤️ by PullRequest

@@ -84,7 +84,7 @@ type ChatCompletionRequest struct {
Messages []ChatCompletionRequestMessage `json:"messages"`

// Functions is a list of functions the model may generate JSON inputs for.
Functions []ChatCompletionFunctions `json:"functions"`
Functions []ChatCompletionFunctions `json:"functions,omitempty"`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, very simple fix! Just make sure that everywhere you use this struct that you're not assuming Function has a value.

🔹 Giving Information (Nice to have)

Image of Andy W Andy W

Copy link
Contributor

@tylermann tylermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the fix here, this looks good to me

@tylermann tylermann merged commit f115cc8 into PullRequestInc:main Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Functions feature is causing the API to return [400:invalid_request_error]
2 participants