Skip to content
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

Add openai/gpt-3.5-turbo-0301 model #1401

Merged
merged 2 commits into from
Mar 28, 2023
Merged

Add openai/gpt-3.5-turbo-0301 model #1401

merged 2 commits into from
Mar 28, 2023

Conversation

yifanmai
Copy link
Collaborator

@yifanmai yifanmai commented Mar 3, 2023

Addresses #1218

@yifanmai
Copy link
Collaborator Author

cc @JoelNiklaus

@yifanmai yifanmai mentioned this pull request Mar 14, 2023
5 tasks
@yifanmai
Copy link
Collaborator Author

@teetone could you take a look? Multiple people are asking for this and it would be good to get this out soon. Thanks!

Copy link
Member

@teetone teetone left a comment

Choose a reason for hiding this comment

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

Looks good to me! I wasn't sure about the +1 for max_tokens.

"n": request.num_completions,
# TODO: Setting stop causes the server to return a HTTP 500 error.
# "stop": request.stop_sequences or None, # API doesn't like empty list
"max_tokens": request.max_tokens + 1, # Uhhh
Copy link
Member

Choose a reason for hiding this comment

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

What is this +1 for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removing the +1 for now.

The special roles take up tokens, so if you want 1 token, you actually have to ask 2 tokens. But I'd rather handle this elsewhere.

@@ -79,6 +79,7 @@ def get_client(self, request: Request) -> Client:
client = OpenAIClient(
api_key=self.credentials["openaiApiKey"],
cache_config=cache_config,
tokenizer_client=self.get_tokenizer_client("huggingface"),
chat_gpt_client=chat_gpt_client,
Copy link
Member

Choose a reason for hiding this comment

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

Do you mind removing chat_gpt_client and deleting ChatGPTClient? I don't think we need it now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK, will do this in a new PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Filed #1447 to track removing ChatGPTClient.

Add window service

Comments

Fixes

More fixes

Review fixes
@yifanmai yifanmai changed the title Add ChatGPT API Add openai/gpt-3.5-turbo and openai/gpt-3.5-turbo-0301 models Mar 28, 2023
@yifanmai yifanmai changed the title Add openai/gpt-3.5-turbo and openai/gpt-3.5-turbo-0301 models Add openai/gpt-3.5-turbo-0301 model Mar 28, 2023
@yifanmai yifanmai merged commit 2b1920e into main Mar 28, 2023
@yifanmai yifanmai deleted the yifanmai/1218-chatgpt branch March 28, 2023 19:00
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.

2 participants