-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add support for GPT-4-32K and GPT-4-32K-0314 models #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,10 @@ var ( | |
// GPT3 Models are designed for text-based tasks. For code-specific | ||
// tasks, please refer to the Codex series of models. | ||
const ( | ||
GPT432K0314 = "gpt-4-32k-0314" | ||
GPT432K = "gpt-4-32k" | ||
GPT40314 = "gpt-4-0314" | ||
GPT4 = "gpt-4" | ||
GPT3Dot5Turbo0301 = "gpt-3.5-turbo-0301" | ||
GPT3Dot5Turbo = "gpt-3.5-turbo" | ||
GPT3TextDavinci003 = "text-davinci-003" | ||
|
@@ -97,7 +101,8 @@ func (c *Client) CreateCompletion( | |
ctx context.Context, | ||
request CompletionRequest, | ||
) (response CompletionResponse, err error) { | ||
if request.Model == GPT3Dot5Turbo0301 || request.Model == GPT3Dot5Turbo { | ||
switch request.Model { | ||
case GPT3Dot5Turbo0301, GPT3Dot5Turbo, GPT4, GPT40314, GPT432K0314, GPT432K: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we sure that GPT4 is not available for the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am uncertain at this time as my account does not yet have the necessary permissions to use the new GPT-4 API There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it, thanks! I appreciate the effort to keep the API less brittle — let's wait a bit until we know these limitations for sure. We can either keep this PR open or close it until next time. |
||
err = ErrCompletionUnsupportedModel | ||
return | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is useful though, let's remove the other switch and merge!