Skip to content

Commit

Permalink
Merge pull request #130 from llm-tools/huggingface
Browse files Browse the repository at this point in the history
OpenAI refactor
  • Loading branch information
adhityan authored Oct 15, 2024
2 parents daeb63c + b3b06f5 commit 02b1ce1
Show file tree
Hide file tree
Showing 99 changed files with 517 additions and 345 deletions.
4 changes: 4 additions & 0 deletions core/embedjs-interfaces/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.7 (2024-10-15)

This was a version bump only for embedjs-interfaces to align it with other projects, there were no code changes.

## 0.1.6 (2024-10-13)

This was a version bump only for embedjs-interfaces to align it with other projects, there were no code changes.
Expand Down
2 changes: 1 addition & 1 deletion core/embedjs-interfaces/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@llm-tools/embedjs-interfaces",
"version": "0.1.6",
"version": "0.1.7",
"description": "Interfaces for extending the embedjs ecosystem",
"dependencies": {
"@langchain/core": "^0.3.9",
Expand Down
4 changes: 4 additions & 0 deletions core/embedjs-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.7 (2024-10-15)

This was a version bump only for embedjs-utils to align it with other projects, there were no code changes.

## 0.1.6 (2024-10-13)

This was a version bump only for embedjs-utils to align it with other projects, there were no code changes.
Expand Down
4 changes: 2 additions & 2 deletions core/embedjs-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@llm-tools/embedjs-utils",
"version": "0.1.6",
"version": "0.1.7",
"description": "Useful util functions when extending the embedjs ecosystem",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.6"
"@llm-tools/embedjs-interfaces": "0.1.7"
},
"type": "module",
"main": "./src/index.js",
Expand Down
4 changes: 4 additions & 0 deletions core/embedjs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.7 (2024-10-15)

This was a version bump only for embedjs to align it with other projects, there were no code changes.

## 0.1.6 (2024-10-13)

This was a version bump only for embedjs to align it with other projects, there were no code changes.
Expand Down
6 changes: 3 additions & 3 deletions core/embedjs/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"type": "module",
"name": "@llm-tools/embedjs",
"version": "0.1.6",
"version": "0.1.7",
"description": "A NodeJS RAG framework to easily work with LLMs and custom datasets",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.6",
"@llm-tools/embedjs-utils": "0.1.6",
"@llm-tools/embedjs-interfaces": "0.1.7",
"@llm-tools/embedjs-utils": "0.1.7",
"axios": "^1.7.7",
"debug": "^4.3.7",
"langchain": "^0.3.2",
Expand Down
4 changes: 4 additions & 0 deletions databases/embedjs-astra/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.7 (2024-10-15)

This was a version bump only for embedjs-astra to align it with other projects, there were no code changes.

## 0.1.6 (2024-10-13)

This was a version bump only for embedjs-astra to align it with other projects, there were no code changes.
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-astra/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@llm-tools/embedjs-astradb",
"version": "0.1.6",
"version": "0.1.7",
"description": "Add AstraDB support to embedjs",
"dependencies": {
"@datastax/astra-db-ts": "^1.5.0",
"@llm-tools/embedjs-interfaces": "0.1.6",
"@llm-tools/embedjs-interfaces": "0.1.7",
"debug": "^4.3.7"
},
"type": "module",
Expand Down
4 changes: 4 additions & 0 deletions databases/embedjs-cosmos/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.7 (2024-10-15)

This was a version bump only for embedjs-cosmos to align it with other projects, there were no code changes.

## 0.1.6 (2024-10-13)

This was a version bump only for embedjs-cosmos to align it with other projects, there were no code changes.
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-cosmos/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@llm-tools/embedjs-cosmos",
"version": "0.1.6",
"version": "0.1.7",
"description": "Add CosmosDB support to embedjs",
"dependencies": {
"@azure/cosmos": "^4.1.1",
"@llm-tools/embedjs-interfaces": "0.1.6",
"@llm-tools/embedjs-interfaces": "0.1.7",
"debug": "^4.3.7"
},
"type": "module",
Expand Down
4 changes: 4 additions & 0 deletions databases/embedjs-hnswlib/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.7 (2024-10-15)

This was a version bump only for embedjs-hnswlib to align it with other projects, there were no code changes.

## 0.1.6 (2024-10-13)

This was a version bump only for embedjs-hnswlib to align it with other projects, there were no code changes.
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-hnswlib/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@llm-tools/embedjs-hnswlib",
"version": "0.1.6",
"version": "0.1.7",
"description": "Add HNSWLib support to embedjs",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.6",
"@llm-tools/embedjs-interfaces": "0.1.7",
"debug": "^4.3.7",
"hnswlib-node": "^3.0.0"
},
Expand Down
4 changes: 4 additions & 0 deletions databases/embedjs-lancedb/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.7 (2024-10-15)

This was a version bump only for embedjs-lancedb to align it with other projects, there were no code changes.

## 0.1.6 (2024-10-13)

This was a version bump only for embedjs-lancedb to align it with other projects, there were no code changes.
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-lancedb/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@llm-tools/embedjs-lancedb",
"version": "0.1.6",
"version": "0.1.7",
"description": "Add LanceDb support to embedjs",
"dependencies": {
"@lancedb/lancedb": "^0.11.0",
"@llm-tools/embedjs-interfaces": "0.1.6",
"@llm-tools/embedjs-interfaces": "0.1.7",
"compute-cosine-similarity": "^1.1.0"
},
"type": "module",
Expand Down
4 changes: 4 additions & 0 deletions databases/embedjs-lmdb/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.7 (2024-10-15)

This was a version bump only for embedjs-lmdb to align it with other projects, there were no code changes.

## 0.1.6 (2024-10-13)

This was a version bump only for embedjs-lmdb to align it with other projects, there were no code changes.
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-lmdb/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@llm-tools/embedjs-lmdb",
"version": "0.1.6",
"version": "0.1.7",
"description": "Add LMDB support to embedjs",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.6",
"@llm-tools/embedjs-interfaces": "0.1.7",
"lmdb": "^3.1.3"
},
"type": "module",
Expand Down
4 changes: 4 additions & 0 deletions databases/embedjs-mongodb/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.7 (2024-10-15)

This was a version bump only for embedjs-mongodb to align it with other projects, there were no code changes.

## 0.1.6 (2024-10-13)

This was a version bump only for embedjs-mongodb to align it with other projects, there were no code changes.
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-mongodb/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@llm-tools/embedjs-mongodb",
"version": "0.1.6",
"version": "0.1.7",
"description": "Add MongoDB support to embedjs",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.6",
"@llm-tools/embedjs-interfaces": "0.1.7",
"debug": "^4.3.7",
"mongodb": "^6.9.0"
},
Expand Down
4 changes: 4 additions & 0 deletions databases/embedjs-pinecone/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.7 (2024-10-15)

This was a version bump only for embedjs-pinecone to align it with other projects, there were no code changes.

## 0.1.6 (2024-10-13)

This was a version bump only for embedjs-pinecone to align it with other projects, there were no code changes.
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-pinecone/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@llm-tools/embedjs-pinecone",
"version": "0.1.6",
"version": "0.1.7",
"description": "Add Pinecone support to embedjs",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.6",
"@llm-tools/embedjs-interfaces": "0.1.7",
"@pinecone-database/pinecone": "^3.0.3",
"debug": "^4.3.7"
},
Expand Down
4 changes: 4 additions & 0 deletions databases/embedjs-qdrant/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.7 (2024-10-15)

This was a version bump only for embedjs-qdrant to align it with other projects, there were no code changes.

## 0.1.6 (2024-10-13)

This was a version bump only for embedjs-qdrant to align it with other projects, there were no code changes.
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-qdrant/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@llm-tools/embedjs-qdrant",
"version": "0.1.6",
"version": "0.1.7",
"description": "Add Qdrant support to embedjs",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.6",
"@llm-tools/embedjs-interfaces": "0.1.7",
"@qdrant/js-client-rest": "^1.12.0",
"debug": "^4.3.7",
"uuid": "^10.0.0"
Expand Down
4 changes: 4 additions & 0 deletions databases/embedjs-redis/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.7 (2024-10-15)

This was a version bump only for embedjs-redis to align it with other projects, there were no code changes.

## 0.1.6 (2024-10-13)

This was a version bump only for embedjs-redis to align it with other projects, there were no code changes.
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-redis/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@llm-tools/embedjs-redis",
"version": "0.1.6",
"version": "0.1.7",
"description": "Add Redis support to embedjs",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.6",
"@llm-tools/embedjs-interfaces": "0.1.7",
"ioredis": "^5.4.1"
},
"type": "module",
Expand Down
4 changes: 4 additions & 0 deletions databases/embedjs-weaviate/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.7 (2024-10-15)

This was a version bump only for embedjs-weaviate to align it with other projects, there were no code changes.

## 0.1.6 (2024-10-13)

This was a version bump only for embedjs-weaviate to align it with other projects, there were no code changes.
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-weaviate/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@llm-tools/embedjs-weaviate",
"version": "0.1.6",
"version": "0.1.7",
"description": "Add Weaviate support to embedjs",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.6",
"@llm-tools/embedjs-interfaces": "0.1.7",
"compute-cosine-similarity": "^1.1.0",
"debug": "^4.3.7",
"weaviate-ts-client": "^2.2.0"
Expand Down
8 changes: 4 additions & 4 deletions docs/api-reference/methods/add-loader.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ The `addLoader()` method is used to load the data sources from different data so

```ts Code example
import { RAGApplicationBuilder } from '@llm-tools/embedjs';
import { OpenAi3SmallEmbeddings } from '@llm-tools/embedjs-openai';
import { OpenAiEmbeddings } from '@llm-tools/embedjs-openai';
import { HNSWDb } from '@llm-tools/embedjs-hnswlib';
import { WebLoader } from '@llm-tools/embedjs-loader-web';

const app = await new RAGApplicationBuilder()
.setModel(SIMPLE_MODELS.OPENAI_GPT4_O)
.setEmbeddingModel(new OpenAi3SmallEmbeddings())
.setEmbeddingModel(new OpenAiEmbeddings())
.setVectorDb(new HNSWDb())
.build();

Expand All @@ -34,13 +34,13 @@ await app.addLoader(new WebLoader({ urlOrContent: 'https://www.forbes.com/profil

```ts Code example
import { RAGApplicationBuilder } from '@llm-tools/embedjs';
import { OpenAi3SmallEmbeddings } from '@llm-tools/embedjs-openai';
import { OpenAiEmbeddings } from '@llm-tools/embedjs-openai';
import { HNSWDb } from '@llm-tools/embedjs-hnswlib';
import { SitemapLoader } from '@llm-tools/embedjs-loader-sitemap';

const app = await new RAGApplicationBuilder()
.setModel(SIMPLE_MODELS.OPENAI_GPT4_O)
.setEmbeddingModel(new OpenAi3SmallEmbeddings())
.setEmbeddingModel(new OpenAiEmbeddings())
.setVectorDb(new HNSWDb())
.build();

Expand Down
4 changes: 2 additions & 2 deletions docs/api-reference/methods/delete-loader.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ The `deleteLoader()` method allows you to delete the data loaded by a loader pre

```ts
import { RAGApplicationBuilder } from '@llm-tools/embedjs';
import { OpenAi3SmallEmbeddings } from '@llm-tools/embedjs-openai';
import { OpenAiEmbeddings } from '@llm-tools/embedjs-openai';
import { HNSWDb } from '@llm-tools/embedjs-hnswlib';
import { RedisCache } from '@llm-tools/embedjs-redis';
import { WebLoader } from '@llm-tools/embedjs-loader-web';
import { SitemapLoader } from '@llm-tools/embedjs-loader-sitemap';

const app = await new RAGApplicationBuilder()
.setModel(SIMPLE_MODELS.OPENAI_GPT4_O)
.setEmbeddingModel(new OpenAi3SmallEmbeddings())
.setEmbeddingModel(new OpenAiEmbeddings())
.setVectorDb(new HNSWDb())
.setCache(
new RedisCache({
Expand Down
4 changes: 2 additions & 2 deletions docs/api-reference/methods/get-loaders.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ This data comes from the cache and if the cache is inMemory, then the list will

```ts
import { RAGApplicationBuilder } from '@llm-tools/embedjs';
import { OpenAi3SmallEmbeddings } from '@llm-tools/embedjs-openai';
import { OpenAiEmbeddings } from '@llm-tools/embedjs-openai';
import { HNSWDb } from '@llm-tools/embedjs-hnswlib';
import { RedisCache } from '@llm-tools/embedjs-redis';
import { WebLoader } from '@llm-tools/embedjs-loader-web';
import { SitemapLoader } from '@llm-tools/embedjs-loader-sitemap';

const app = await new RAGApplicationBuilder()
.setModel(SIMPLE_MODELS.OPENAI_GPT4_O)
.setEmbeddingModel(new OpenAi3SmallEmbeddings())
.setEmbeddingModel(new OpenAiEmbeddings())
.setVectorDb(new HNSWDb())
.setCache(
new RedisCache({
Expand Down
4 changes: 2 additions & 2 deletions docs/api-reference/methods/reset.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ The `reset()` method allows you to wipe the data from your RAG application and s

```ts Code example
import { RAGApplicationBuilder } from '@llm-tools/embedjs';
import { OpenAi3SmallEmbeddings } from '@llm-tools/embedjs-openai';
import { OpenAiEmbeddings } from '@llm-tools/embedjs-openai';
import { HNSWDb } from '@llm-tools/embedjs-hnswlib';
import { WebLoader } from '@llm-tools/embedjs-loader-web';

const app = await new RAGApplicationBuilder()
.setModel(SIMPLE_MODELS.OPENAI_GPT4_O)
.setEmbeddingModel(new OpenAi3SmallEmbeddings())
.setEmbeddingModel(new OpenAiEmbeddings())
.setVectorDb(new HNSWDb())
.build();

Expand Down
4 changes: 2 additions & 2 deletions docs/api-reference/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ Create a EmbedJs `RAGApplication` using `RAGApplicationBuilder`. `RAGApplication

```ts Code Example
import { RAGApplicationBuilder } from '@llm-tools/embedjs';
import { OpenAi3SmallEmbeddings } from '@llm-tools/embedjs-openai';
import { OpenAiEmbeddings } from '@llm-tools/embedjs-openai';
import { HNSWDb } from '@llm-tools/embedjs-hnswlib';

//app is of type RAGApplication
const app = await new RAGApplicationBuilder()
.setModel(SIMPLE_MODELS.OPENAI_GPT4_O)
.setEmbeddingModel(new OpenAi3SmallEmbeddings())
.setEmbeddingModel(new OpenAiEmbeddings())
.setVectorDb(new HNSWDb())
.build();
```
8 changes: 4 additions & 4 deletions docs/components/data-sources/csv.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ npm install @llm-tools/embedjs-loader-csv

```ts
import { RAGApplicationBuilder } from '@llm-tools/embedjs';
import { OpenAi3SmallEmbeddings } from '@llm-tools/embedjs-openai';
import { OpenAiEmbeddings } from '@llm-tools/embedjs-openai';
import { HNSWDb } from '@llm-tools/embedjs-hnswlib';
import { DocxLoader } from '@llm-tools/embedjs-loader-csv';

const app = await new RAGApplicationBuilder()
.setModel(SIMPLE_MODELS.OPENAI_GPT4_O)
.setEmbeddingModel(new OpenAi3SmallEmbeddings())
.setEmbeddingModel(new OpenAiEmbeddings())
.setVectorDb(new HNSWDb())
.build();

Expand All @@ -34,13 +34,13 @@ app.addLoader(new CsvLoader({ filePathOrUrl: '/path/to/file.csv' }))

```ts
import { RAGApplicationBuilder } from '@llm-tools/embedjs';
import { OpenAi3SmallEmbeddings } from '@llm-tools/embedjs-openai';
import { OpenAiEmbeddings } from '@llm-tools/embedjs-openai';
import { HNSWDb } from '@llm-tools/embedjs-hnswlib';
import { DocxLoader } from '@llm-tools/embedjs-loader-csv';

const app = await new RAGApplicationBuilder()
.setModel(SIMPLE_MODELS.OPENAI_GPT4_O)
.setEmbeddingModel(new OpenAi3SmallEmbeddings())
.setEmbeddingModel(new OpenAiEmbeddings())
.setVectorDb(new HNSWDb())
.build();

Expand Down
Loading

0 comments on commit 02b1ce1

Please sign in to comment.