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

Adding support for GPT-4o and GPT-4-turbo. #32

Merged
merged 14 commits into from
May 25, 2024
Merged

Conversation

wz-ml
Copy link
Collaborator

@wz-ml wz-ml commented May 16, 2024

Changes:

  • Added support for GPT-4-turbo (🚀) and GPT-4o (🅾️).
  • Removed support for instruct models and added back streaming.

Copy link
Owner

@giosilvi giosilvi left a comment

Choose a reason for hiding this comment

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

Starting the review, so far it looks good.

src/gpt3.js Outdated
@@ -1,8 +1,16 @@
import GPT3Tokenizer from "gpt3-tokenizer";

const tokenizer = new GPT3Tokenizer({ type: "gpt3" });
const CHAT_API_MODELS = {
Copy link
Owner

Choose a reason for hiding this comment

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

This needs to be export const CHAT_API_MODELS to work correctly. And the imports should become:
import { CHAT_API_MODELS } from.
All the import were not actually working, so all the if model in CHAT_API_MODELS conditions (apart from gtp3.js) were false by default.
Note also, that now all prompt should have the prompt formatted as:
{ "role": "user", "content": text }
including the custom prompts in background.js.

Given that now all models are chat-type we may add a switch to chose for the fast prompt or chat-gpt type of prompt

Copy link
Owner

Choose a reason for hiding this comment

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

I pushed a fix for the above. This should be enough unless I missed something else.

@giosilvi giosilvi merged commit dc3d056 into giosilvi:master May 25, 2024
3 checks passed
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