GPU Poor POV: Willingness of Customization 
text
GPU Poor POV: Willingness of Customization 
new_line
new_line
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.
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.
new_line
new_line
Edit: 
text
Edit: 
new_line
new_line
My CustomEmbeddingFunction can be found here:
text
My CustomEmbeddingFunction can be found here:
new_line
https://gist.github.com/s3nh/cfbbf43f5e9e3cfe8c3e4e2f0d550b80
https://gist.github.com/s3nh/cfbbf43f5e9e3cfe8c3e4e2f0d550b80
link
new_line
new_line
and you can use it by initializing or calling the chroma collection. 
text
and you can use it by initializing or calling the chroma collection. 
new_line
new_line

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
```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)
```
code_fence
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
5f17f0a0925b9863e28ad517
https://cdn-avatars.huggingface.co/v1/production/uploads/5f17f0a0925b9863e28ad517/fXIY5i9RLsIa1v3CCuVtt.jpeg
Victor Mustar
victor
user
61caeda441f9432649f03ab6
https://cdn-avatars.huggingface.co/v1/production/uploads/61caeda441f9432649f03ab6/IazJBCi7Cr34DgZXZeI4k.jpeg
s3nh
s3nh
user