text
GPU Poor POV: Willingness of Customization 
GPU Poor POV: Willingness of Customization 
new_line
new_line
text
I love to use libraries in which you can customize a lot of things. Chromadb is my choice of db if it comes to store embeddings. Te cool feature is that you can define your own embeddings function which can be called on every chromadb collection initialisation or creation. It is useful because sometimes we want to use  different prompts, different models, and it can be easily written as inheritence from EmbeddingFunction class.
I love to use libraries in which you can customize a lot of things. Chromadb is my choice of db if it comes to store embeddings. Te cool feature is that you can define your own embeddings function which can be called on every chromadb collection initialisation or creation. It is useful because sometimes we want to use  different prompts, different models, and it can be easily written as inheritence from EmbeddingFunction class.
new_line
new_line
text
Edit: 
Edit: 
new_line
new_line
text
My CustomEmbeddingFunction can be found here:
My CustomEmbeddingFunction can be found here:
new_line
link
https://gist.github.com/s3nh/cfbbf43f5e9e3cfe8c3e4e2f0d550b80
https://gist.github.com/s3nh/cfbbf43f5e9e3cfe8c3e4e2f0d550b80
new_line
new_line
text
and you can use it by initializing or calling the chroma collection. 
and you can use it by initializing or calling the chroma collection. 
new_line
new_line
code_fence
```python

import chromadb 
from your_custom_fn import CustomEmbeddingFunction
class ChromaStorage:
    def __init__(self, config):
        self.config = config
        self.client = self.init_client()
        self.embedding_function = CustomEmbeddingFunction()

    def check_config(self):
        assert os.path.exists(self.config.path), ValueError('Provided path does not exists!!')

    def init_client(self):
        return chromadb.PersistentClient(path = self.config.path,)

    def init_collection(self, name: str): 
        return self.client.get_or_create_collection(name = name, embedding_function = self.embedding_function)
```

import chromadb 
from your_custom_fn import CustomEmbeddingFunction
class ChromaStorage:
    def __init__(self, config):
        self.config = config
        self.client = self.init_client()
        self.embedding_function = CustomEmbeddingFunction()

    def check_config(self):
        assert os.path.exists(self.config.path), ValueError('Provided path does not exists!!')

    def init_client(self):
        return chromadb.PersistentClient(path = self.config.path,)

    def init_collection(self, name: str): 
        return self.client.get_or_create_collection(name = name, embedding_function = self.embedding_function)
python
GPU Poor POV: Willingness of Customization 

I love to use libraries in which you can customize a lot of things. Chromadb is my choice of db if it comes to store embeddings. Te cool feature is that you can define your own embeddings function which can be called on every chromadb collection initialisation or creation. It is useful because sometimes we want to use  different prompts, different models, and it can be easily written as inheritence from EmbeddingFunction class.

Edit: 

My CustomEmbeddingFunction can be found here:
https://gist.github.com/s3nh/cfbbf43f5e9e3cfe8c3e4e2f0d550b80

and you can use it by initializing or calling the chroma collection. 

```python

import chromadb 
from your_custom_fn import CustomEmbeddingFunction
class ChromaStorage:
    def __init__(self, config):
        self.config = config
        self.client = self.init_client()
        self.embedding_function = CustomEmbeddingFunction()

    def check_config(self):
        assert os.path.exists(self.config.path), ValueError('Provided path does not exists!!')

    def init_client(self):
        return chromadb.PersistentClient(path = self.config.path,)

    def init_collection(self, name: str): 
        return self.client.get_or_create_collection(name = name, embedding_function = self.embedding_function)
```
👍
victor julien-c samusenps NeuralNovel krinal clem s3nh lunarflu KnutJaegersberg tawfikgh Ji-Ha
🤯
osanseviero victor julien-c NeuralNovel clem
https://cdn-avatars.huggingface.co/v1/production/uploads/5f17f0a0925b9863e28ad517/X7QKoiXbUtEZSG9jyvfk3.jpeg
Victor Mustar
victor
user
https://cdn-avatars.huggingface.co/v1/production/uploads/61caeda441f9432649f03ab6/0UdRCrzIqhedZblgfpMBk.png
s3nh
s3nh
user