content.raw: GPU Poor POV: Willingness of Customization 
content.type: text
content.value: GPU Poor POV: Willingness of Customization 
content.type: new_line
content.type: new_line
content.raw: 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.
content.type: text
content.value: 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.
content.type: new_line
content.type: new_line
content.raw: Edit: 
content.type: text
content.value: Edit: 
content.type: new_line
content.type: new_line
content.raw: My CustomEmbeddingFunction can be found here:
content.type: text
content.value: My CustomEmbeddingFunction can be found here:
content.type: new_line
content.href: https://gist.github.com/s3nh/cfbbf43f5e9e3cfe8c3e4e2f0d550b80
content.raw: https://gist.github.com/s3nh/cfbbf43f5e9e3cfe8c3e4e2f0d550b80
content.type: link
content.type: new_line
content.type: new_line
content.raw: and you can use it by initializing or calling the chroma collection. 
content.type: text
content.value: and you can use it by initializing or calling the chroma collection. 
content.type: new_line
content.type: new_line
content.code: 
  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)
content.lang: python
content.raw: ```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)
  ```
content.type: code_fence
rawContent: 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)
  ```
reactions.reaction: 👍
reactions.users: victor julien-c samusenps NeuralNovel krinal clem s3nh lunarflu KnutJaegersberg tawfikgh Ji-Ha
reactions.reaction: 🤯
reactions.users: osanseviero victor julien-c NeuralNovel clem
commentators._id: 61caeda441f9432649f03ab6
commentators.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/61caeda441f9432649f03ab6/IazJBCi7Cr34DgZXZeI4k.jpeg
commentators.fullname: s3nh
commentators.name: s3nh
commentators.type: user
commentators._id: 5f17f0a0925b9863e28ad517
commentators.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/5f17f0a0925b9863e28ad517/fXIY5i9RLsIa1v3CCuVtt.jpeg
commentators.fullname: Victor Mustar
commentators.name: victor
commentators.type: user