Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Create Llama
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
run-llama
Create Llama
Commits
6bd5e7b7
Unverified
Commit
6bd5e7b7
authored
10 months ago
by
Huu Le (Lee)
Committed by
GitHub
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
using ingestion pipeline for chromadb (#87)
parent
38bc1d13
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
templates/components/vectordbs/python/chroma/generate.py
+0
-33
0 additions, 33 deletions
templates/components/vectordbs/python/chroma/generate.py
templates/components/vectordbs/python/chroma/index.py
+0
-14
0 additions, 14 deletions
templates/components/vectordbs/python/chroma/index.py
with
0 additions
and
47 deletions
templates/components/vectordbs/python/chroma/generate.py
deleted
100644 → 0
+
0
−
33
View file @
38bc1d13
from
dotenv
import
load_dotenv
load_dotenv
()
import
os
import
logging
from
llama_index.core.storage
import
StorageContext
from
llama_index.core.indices
import
VectorStoreIndex
from
app.settings
import
init_settings
from
app.engine.loaders
import
get_documents
from
app.engine.vectordb
import
get_vector_store
logging
.
basicConfig
(
level
=
logging
.
INFO
)
logger
=
logging
.
getLogger
()
def
generate_datasource
():
init_settings
()
logger
.
info
(
"
Creating new index
"
)
# load the documents and create the index
documents
=
get_documents
()
store
=
get_vector_store
()
storage_context
=
StorageContext
.
from_defaults
(
vector_store
=
store
)
VectorStoreIndex
.
from_documents
(
documents
,
storage_context
=
storage_context
,
show_progress
=
True
,
# this will show you a progress bar as the embeddings are created
)
logger
.
info
(
"
Successfully created embeddings in the ChromaDB
"
)
if
__name__
==
"
__main__
"
:
generate_datasource
()
This diff is collapsed.
Click to expand it.
templates/components/vectordbs/python/chroma/index.py
deleted
100644 → 0
+
0
−
14
View file @
38bc1d13
import
logging
from
llama_index.core.indices
import
VectorStoreIndex
from
app.engine.vectordb
import
get_vector_store
logger
=
logging
.
getLogger
(
"
uvicorn
"
)
def
get_index
():
logger
.
info
(
"
Connecting to ChromaDB..
"
)
store
=
get_vector_store
()
index
=
VectorStoreIndex
.
from_vector_store
(
store
,
use_async
=
False
)
logger
.
info
(
"
Finished connecting to ChromaDB.
"
)
return
index
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment