Add Huggingface embeddings and Cohere embeddings (#63)

* Add huggingface embeddings and cohere embeddings
* Update openai interface and the mock for newer OpenAI SDK

---------

Co-authored-by: trducng <trungduc1992@gmail.com>
This commit is contained in:
ian_Cin
2023-11-10 09:38:30 +07:00
committed by GitHub
parent 9035e25666
commit 6095526dc7
13 changed files with 249 additions and 138 deletions

View File

@@ -8,7 +8,7 @@ from ..base import BaseComponent
from ..documents.base import Document
class AutoReader(BaseComponent, BaseReader):
class AutoReader(BaseComponent):
"""General auto reader for a variety of files. (based on llama-hub)"""
def __init__(self, reader_type: Union[str, Type[BaseReader]]) -> None:
@@ -31,7 +31,7 @@ class AutoReader(BaseComponent, BaseReader):
return self.load_data(file=file, **kwargs)
class LIBaseReader(BaseComponent, BaseReader):
class LIBaseReader(BaseComponent):
_reader_class: Type[BaseReader]
def __init__(self, *args, **kwargs):