Skip to content

Commit

Permalink
update google vertex ai embedding to use newer langchain version
Browse files Browse the repository at this point in the history
  • Loading branch information
adhityan committed Sep 16, 2024
1 parent e9c934c commit 7f55b75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@llm-tools/embedjs",
"version": "0.0.95",
"version": "0.0.96",
"description": "A NodeJS RAG framework to easily work with LLMs and custom datasets",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions src/embeddings/gecko-embeddings.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { GoogleVertexAIEmbeddings } from '@langchain/community/embeddings/googlevertexai';
import { VertexAIEmbeddings } from '@langchain/google-vertexai';
import { BaseEmbeddings } from '../interfaces/base-embeddings.js';

export class GeckoEmbeddings implements BaseEmbeddings {
private model: GoogleVertexAIEmbeddings;
private model: VertexAIEmbeddings;

constructor() {
this.model = new GoogleVertexAIEmbeddings({ model: 'textembedding-gecko', maxConcurrency: 3, maxRetries: 5 });
this.model = new VertexAIEmbeddings({ model: 'textembedding-gecko', maxConcurrency: 3, maxRetries: 5 });
}

async getDimensions(): Promise<number> {
Expand Down

0 comments on commit 7f55b75

Please sign in to comment.