mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-12 21:11:43 +00:00
community[patch]: Add semantic info to metadata, classified by pebblo-server. (#20468)
Description: Add support for Semantic topics and entities. Classification done by pebblo-server is not used to enhance metadata of Documents loaded by document loaders. Dependencies: None Documentation: Updated. Signed-off-by: Rahul Tripathi <rauhl.psit.ec@gmail.com> Co-authored-by: Rahul Tripathi <rauhl.psit.ec@gmail.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import pathlib
|
||||
import platform
|
||||
from typing import Optional, Tuple
|
||||
|
||||
from langchain_core.documents import Document
|
||||
from langchain_core.env import get_runtime_environment
|
||||
from langchain_core.pydantic_v1 import BaseModel
|
||||
|
||||
@@ -61,6 +62,10 @@ SUPPORTED_LOADERS = (*file_loader, *dir_loader, *in_memory)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class IndexedDocument(Document):
|
||||
id: str
|
||||
|
||||
|
||||
class Runtime(BaseModel):
|
||||
"""Pebblo Runtime.
|
||||
|
||||
|
Reference in New Issue
Block a user