-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to use LLMs and embedding models from Ollama running loca…
…lly. (#45) * add new ollama provider, ability to use local ollama llama3.1 llm * revert header override for local ollama. * added in ollama nomic-embed-text embeddings * remove toggle to use ollama and fallback to using llm names. * add in ollama embeddings - mxbai-embed-large * configure ollama url via settings, and throw expection if not set. * adjust dimensions for mxbai_embed_large * retain bearer header incase needed for hosted ollama * updated with linting changes. * remove incept5/llama3.1-claude and be explicit on llama3.1:8b * removed usage of openAIKey for ollama * update filenames to be more meaningful
- Loading branch information
Showing
20 changed files
with
857 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CREATE TABLE IF NOT EXISTS "vector_data_nomic_embed_text" ( | ||
"id" serial PRIMARY KEY NOT NULL, | ||
"path" text NOT NULL, | ||
"mtime" bigint NOT NULL, | ||
"content" text NOT NULL, | ||
"embedding" vector(768), | ||
"metadata" jsonb NOT NULL | ||
); | ||
--> statement-breakpoint | ||
CREATE INDEX IF NOT EXISTS "embeddingIndex_nomic_embed_text" ON "vector_data_nomic_embed_text" USING hnsw ("embedding" vector_cosine_ops); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CREATE TABLE IF NOT EXISTS "vector_data_mxbai_embed_large" ( | ||
"id" serial PRIMARY KEY NOT NULL, | ||
"path" text NOT NULL, | ||
"mtime" bigint NOT NULL, | ||
"content" text NOT NULL, | ||
"embedding" vector(1024), | ||
"metadata" jsonb NOT NULL | ||
); | ||
--> statement-breakpoint | ||
CREATE INDEX IF NOT EXISTS "embeddingIndex_mxbai_embed_large" ON "vector_data_mxbai_embed_large" USING hnsw ("embedding" vector_cosine_ops); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,192 @@ | ||
{ | ||
"id": "66d66503-35b5-4c19-8433-529426a63956", | ||
"prevId": "1084161a-8de5-4452-ba8b-6ffc3549d411", | ||
"version": "7", | ||
"dialect": "postgresql", | ||
"tables": { | ||
"public.vector_data_text_embedding_3_small": { | ||
"name": "vector_data_text_embedding_3_small", | ||
"schema": "", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "serial", | ||
"primaryKey": true, | ||
"notNull": true | ||
}, | ||
"path": { | ||
"name": "path", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"mtime": { | ||
"name": "mtime", | ||
"type": "bigint", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"content": { | ||
"name": "content", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"embedding": { | ||
"name": "embedding", | ||
"type": "vector(1536)", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"metadata": { | ||
"name": "metadata", | ||
"type": "jsonb", | ||
"primaryKey": false, | ||
"notNull": true | ||
} | ||
}, | ||
"indexes": { | ||
"embeddingIndex_text_embedding_3_small": { | ||
"name": "embeddingIndex_text_embedding_3_small", | ||
"columns": [ | ||
{ | ||
"expression": "embedding", | ||
"isExpression": false, | ||
"asc": true, | ||
"nulls": "last", | ||
"opclass": "vector_cosine_ops" | ||
} | ||
], | ||
"isUnique": false, | ||
"concurrently": false, | ||
"method": "hnsw", | ||
"with": {} | ||
} | ||
}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": {}, | ||
"checkConstraints": {} | ||
}, | ||
"public.vector_data_text_embedding_3_large": { | ||
"name": "vector_data_text_embedding_3_large", | ||
"schema": "", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "serial", | ||
"primaryKey": true, | ||
"notNull": true | ||
}, | ||
"path": { | ||
"name": "path", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"mtime": { | ||
"name": "mtime", | ||
"type": "bigint", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"content": { | ||
"name": "content", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"embedding": { | ||
"name": "embedding", | ||
"type": "vector(3072)", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"metadata": { | ||
"name": "metadata", | ||
"type": "jsonb", | ||
"primaryKey": false, | ||
"notNull": true | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": {}, | ||
"checkConstraints": {} | ||
}, | ||
"public.vector_data_nomic_embed_text": { | ||
"name": "vector_data_nomic_embed_text", | ||
"schema": "", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "serial", | ||
"primaryKey": true, | ||
"notNull": true | ||
}, | ||
"path": { | ||
"name": "path", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"mtime": { | ||
"name": "mtime", | ||
"type": "bigint", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"content": { | ||
"name": "content", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"embedding": { | ||
"name": "embedding", | ||
"type": "vector(768)", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"metadata": { | ||
"name": "metadata", | ||
"type": "jsonb", | ||
"primaryKey": false, | ||
"notNull": true | ||
} | ||
}, | ||
"indexes": { | ||
"embeddingIndex_nomic_embed_text": { | ||
"name": "embeddingIndex_nomic_embed_text", | ||
"columns": [ | ||
{ | ||
"expression": "embedding", | ||
"isExpression": false, | ||
"asc": true, | ||
"nulls": "last", | ||
"opclass": "vector_cosine_ops" | ||
} | ||
], | ||
"isUnique": false, | ||
"concurrently": false, | ||
"method": "hnsw", | ||
"with": {} | ||
} | ||
}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": {}, | ||
"checkConstraints": {} | ||
} | ||
}, | ||
"enums": {}, | ||
"schemas": {}, | ||
"sequences": {}, | ||
"views": {}, | ||
"_meta": { | ||
"columns": {}, | ||
"schemas": {}, | ||
"tables": {} | ||
} | ||
} |
Oops, something went wrong.