-
Notifications
You must be signed in to change notification settings - Fork 3
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 ChromeAI
#27
Add ChromeAI
#27
Conversation
OK looks like we could stop here for now as this seems to be working fine, provided that requirements are met (Chrome + flags enabled). |
Pushed one more commit to not discard completions that may be formatted as code blocks. |
Thanks @jtpio. I had to enable more flags to download the model locally. These steps where describes in https://chromeai.org/ (the link you mentioned in the README. I wonder if we should add these steps directly in the README.
|
Also on my side this is really slow. Do you know if there are some set up to make it faster ? |
On a side note, I realized from you demo that the dates of messages are wrong. |
## Using ChromeAI | ||
|
||
> [!WARNING] | ||
> Support for ChromeAI is still experimental and only available in Google Chrome. |
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.
Do you know if there a way to detect the browser, and have this provider available for chrome only ?
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.
Maybe just checking for window.ai
availability could be enough?
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.
Since we specify the name of the model as part of the settings definition:
"enum": ["None", "Anthropic", "ChromeAI", "MistralAI"]
Not sure there could be a nice way to dynamically enable / disable support for ChromeAI, based on window.ai
? Unless we manually check for "ChromeAI" and remove it from the settings if window.ai === undefined
.
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.
Not sure there could be a nice way to dynamically enable / disable support for ChromeAI, based on
window.ai
?
Yes, that settings management is already hazardous, don't no neither if we want to add more manual changes.
Maybe the way to go will be to add a dedicated configuration panel that doesn't rely on settings...
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.
Maybe the way to go will be to add a dedicated configuration panel that doesn't rely on settings...
Agreed, sounds like it would give more flexibility 👍
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.
I opened #35
Yeah it may be quite slow on some devices indeed. We could mention the same list of flags as on https://chromeai.org/ for completeness, and also leave a note the performance may not be great on some devices. Not sure there is anything more to do about this at the moment. |
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.
Thanks, LGTM
Towards #24
Experimenting with built-in (on device) AI, such as Chrome AI: https://developer.chrome.com/docs/ai/built-in
langchain.js
supports it as a text completion model, still experimental for now: https://js.langchain.com/docs/integrations/llms/chrome_ai/This requires:
One of the main advantages (omitting the browser limitation and required flag) is the zero setup needed (no API key).
jupyterlite-ai-chrome-ai.mp4