style: fmt

This commit is contained in:
aries_ckt 2023-08-03 15:39:16 +08:00
parent 3c8fa10a9b
commit dfa31a39c6
2 changed files with 11 additions and 10 deletions

View File

@ -25,11 +25,11 @@ from langchain.schema import Document
class NewCSVLoader(BaseLoader): class NewCSVLoader(BaseLoader):
def __init__( def __init__(
self, self,
file_path: str, file_path: str,
source_column: Optional[str] = None, source_column: Optional[str] = None,
csv_args: Optional[Dict] = None, csv_args: Optional[Dict] = None,
encoding: Optional[str] = None, encoding: Optional[str] = None,
): ):
""" """

View File

@ -12,9 +12,10 @@ vector_store_config = {
# it can be .md,.pdf,.docx, .csv, .html # it can be .md,.pdf,.docx, .csv, .html
document_path = "your_path/test.md" document_path = "your_path/test.md"
embedding_engine = EmbeddingEngine( embedding_engine = EmbeddingEngine(
knowledge_source=document_path, knowledge_source=document_path,
knowledge_type=KnowledgeType.DOCUMENT.value, knowledge_type=KnowledgeType.DOCUMENT.value,
model_name=embedding_model, model_name=embedding_model,
vector_store_config=vector_store_config) vector_store_config=vector_store_config,
)
# embedding document content to vector store # embedding document content to vector store
embedding_engine.knowledge_embedding() embedding_engine.knowledge_embedding()