mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-18 06:13:54 +00:00
init tests
This commit is contained in:
1 parent
d5945f9ee7
commit
293b7b09a9
3 files changed
+101
-9
No files matched your search
@@ -1,16 +1,8 @@
|
||||
from application.vectorstore.base import BaseVectorStore
|
||||
from application.core.settings import settings
|
||||
from application.vectorstore.document_class import Document
|
||||
import elasticsearch
|
||||
|
||||
class Document(str):
|
||||
"""Class for storing a piece of text and associated metadata."""
|
||||
|
||||
def __new__(cls, page_content: str, metadata: dict):
|
||||
instance = super().__new__(cls, page_content)
|
||||
instance.page_content = page_content
|
||||
instance.metadata = metadata
|
||||
return instance
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user