Conversation
UB-AICLUB
left a comment
There was a problem hiding this comment.
great work with the code, I'm trying to understand why cant we go ahead with a random ID
| collection = client.get_or_create_collection(name=collection_name) | ||
|
|
||
| # Assuming each item needs a unique ID, we're using the text as the ID here | ||
| # In a real-world scenario, you might want to use a more robust ID generation method |
There was a problem hiding this comment.
shouldn't we just go ahead with uuid.uuid4() to get a random id?
There was a problem hiding this comment.
we can go with random id, i will make the changes
| import chromadb | ||
| from chromadb.config import Settings | ||
|
|
||
| def get_connection(): |
There was a problem hiding this comment.
Can we create a class instead, with all the initialisations in the init function. This will eliminate need to call get_connection for creating the function. We can then create the CRUD operations inside the class.
@UB-AICLUB Thoughts?
There was a problem hiding this comment.
yeah we could go with a class but i guess lets not make him do this over again this works na so lets go ahead with it
added the template db.py for chromaDB