continue icon indicating copy to clipboard operation
continue copied to clipboard

Add Bedrock Cohere Embedding Model

Open Anantha-Kandrapu opened this issue 1 year ago • 3 comments

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.

Anantha-Kandrapu avatar Oct 05 '24 06:10 Anantha-Kandrapu

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)

Anantha-Kandrapu avatar Oct 05 '24 10:10 Anantha-Kandrapu

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)?

Patrick-Erichsen avatar Oct 07 '24 19:10 Patrick-Erichsen

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.

Anantha-Kandrapu avatar Oct 07 '24 21:10 Anantha-Kandrapu

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.

Patrick-Erichsen avatar Oct 14 '24 18:10 Patrick-Erichsen

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.

github-actions[bot] avatar Mar 03 '25 04:03 github-actions[bot]

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!

github-actions[bot] avatar Mar 14 '25 02:03 github-actions[bot]