Added Bedrock Cohere Embeddings Provider + explicit apache arrow as d…
Description
- I added a Bedrock cohere embeddings provider.
- I had to add apache arrow as dependency because there were build issues without that package as vectorDB depends on it. (I pasted the error log in the issue).
Checklist
- [x] The base branch of this PR is
dev, rather thanmain - [x] The relevant docs, if any, have been updated or created
Screenshots
- There's no visual changes.
Testing
- I have tested this change in debug mode as mentioned in the documentation, it was able to use bedrock cohere embedding model and fetch the results.
- I ran the
npm run package, copied the extension to another machine and tried it. It ran successfully.
Fixes Apache-arrow error:
detail: undefined, id: '', location: { column: 31, file: '../../core/node_modules/vectordb/dist/remote/index.js', length: 14, line: 19, lineText: 'const apache_arrow_1 = require("apache-arrow");', namespace: '', suggestion: '' }, notes: [ { location: null, text: 'You can mark the path "apache-arrow" as external to exclude it from the bundle, which will remove this error. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.' } ], pluginName: '', text: 'Could not resolve "apache-arrow"' }, { detail: undefined, id: '', location: { column: 31, file: '../../core/node_modules/vectordb/dist/sanitize.js', length: 14, line: 24, lineText: 'const apache_arrow_1 = require("apache-arrow");', namespace: '', suggestion: '' }, notes: [ { location: null, text: 'You can mark the path "apache-arrow" as external to exclude it from the bundle, which will remove this error. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.' } ], pluginName: '', text: 'Could not resolve "apache-arrow"' } ], warnings: [] }
Fix
This PR fix #2475
I will squash and merge these commits https://github.com/continuedev/continue/pull/2478/commits/1011666fdf130ab57f354770d7364e7c4603b737 https://github.com/continuedev/continue/pull/2478/commits/fce4853cc0872ef1e5ccc19f25176536d8769303
@Anantha-Kandrapu thanks for the PR! It looks like a lot of the logic here might overlap with the original Bedrock provider—do you think that we could maintain just a single bedrock embeddings provider that can also support cohere?
Also, I would prefer if the adding of the dependency were in a separate PR, as I'll probably want to review that a bit more closely and it isn't strictly necessary for this update
@Anantha-Kandrapu thanks for the PR! It looks like a lot of the logic here might overlap with the original Bedrock provider—do you think that we could maintain just a single bedrock embeddings provider that can also support cohere?
I have also added a interface so that multiple other embedding providers from bedrock can be added in future.
Hey @chezsmithy , Thanks for the approval earlier. My fork was out of sync because I accidentally merged the main that's a miss on my part sorry. There's one more approval I need. Thanks.
Thanks for the great work here @Anantha-Kandrapu !
Hi @Anantha-Kandrapu, yesterday we shared some updates with our contributors about how we're aiming to improve the contribution process. Part of this included the addition of a Contributor License Agreement (CLA) to protect both contributors and the project. We're reaching out to ask that previous contributors sign it.
Could you please take a moment to sign, or if you have any questions send me a message? (either here or [email protected] would work)
To do so, you just need to post a comment below with the following text:
I have read the CLA Document and I hereby sign the CLA
❤️ Thank you for the work you've done on Continue, and let me know if you have any suggestions on how we can make the project even better!
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.
I have read the CLA Document and I hereby sign the CLA
2 out of 5 committers have signed the CLA.
:white_check_mark: (Patrick-Erichsen)[https://github.com/Patrick-Erichsen]
:white_check_mark: (sestinj)[https://github.com/sestinj]
:x: @classbinu
:x: @Anantha Kandrapu
:x: @Anantha-Kandrapu
classbinu, Anantha Kandrapu seem not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.