Add Bedrock Cohere Embedding Model
Validations
- [X] I believe this is a way to improve. I'll try to join the Continue Discord for questions
- [x] I'm not able to find an open issue that requests the same enhancement
Problem
Currently Cohere embedding models are not supported through bedrock client. It would be great to have cohere embedding model along side current amazon.titan-embed-text models
Solution
Add a new BedrockCohereEmbeddingsProvider to the existing embeddings. Only request and response needs different data structures.
I want to contribute this feature , but when I try to follow the instructions , there's an error which is preventing me to build the code :
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: [] }
I added apache-arrow as external in esbuild.build but it still didn't work . Can you direct me towards a solution or is this a bug ?
I'm on mac M1 pro and node 20.11.0( as suggested)
Hi @Anantha-Kandrapu , appreciate your interest in contributing the feature!
I added your comment to a main issue we created to track other problems users have had starting the extension in development mode: https://github.com/continuedev/continue/issues/2489
As a quick sanity check, could you try running the clean command (under the same Run tasks options that install-all-dependencies is under)?
Hi @Patrick-Erichsen , I have run the clean command , Here's the output.
* Executing task: node /Users/anantkan/continue/scripts/uninstall.js
Removed ./gui/node_modules
./gui/out not found
Removed ./gui/dist
Removed ./core/node_modules
./core/dist not found
Removed ./extensions/vscode/node_modules
Removed ./extensions/vscode/bin
Removed ./extensions/vscode/build
Removed ./extensions/vscode/out
Removed ./binary/node_modules
Removed ./binary/bin
./binary/dist not found
Removed ./binary/out
(node:38576) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
(Use `node --trace-deprecation ...` to show where the warning was created)
* Terminal will be reused by tasks, press any key to close it.
After clean, I switched back to dev branch , I raninstall-all-dependencies , it still had the same apache-arrow dependency issue.
Got it, the output there all looks good. This is coming from our bundling logic for LanceDB, although noticing that it's pulling in the newer vectordb version of the library.
I don't have a good solution in the short run unfortunately. We will be doing some work to try and ease developer onboarding in the near future though so hopefully we can resolve the issue at that time.
This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.
This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!