1. Three party web website data access - Web site synchronization Building a knowledge base by crawling web page data in batches through web crawlers Web site synchronization utilizes crawler technology, which can automatically capture all websites under the same domain name through a single entry website. Currently, it supports up to 200 subpages. For compliance and security reasons, only static site crawling is supported, mainly used for quickly building knowledge bases on various document sites. 2. Feishu Knowledge Base By configuring Feishu document permissions, a knowledge base can be built using Feishu documents, and the documents will not undergo secondary storage 3. Language Bird Knowledge Base You can configure the permissions of the language bird document to build a knowledge base using the language bird document, and the document will not undergo secondary storage
18 lines
1010 B
Python
18 lines
1010 B
Python
import datetime
|
|
import uuid
|
|
from sqlalchemy import Column, Integer, String, DateTime, ForeignKey
|
|
from sqlalchemy.dialects.postgresql import UUID
|
|
from app.db import Base
|
|
|
|
class File(Base):
|
|
__tablename__ = "files"
|
|
|
|
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4, index=True)
|
|
kb_id = Column(UUID(as_uuid=True), nullable=False, comment="knowledges.id")
|
|
created_by = Column(UUID(as_uuid=True), nullable=False, comment="users.id")
|
|
parent_id = Column(UUID(as_uuid=True), nullable=True, default=None, comment="parent folder id")
|
|
file_name = Column(String, index=True, nullable=False, comment="file name or folder name,default folder name is /")
|
|
file_ext = Column(String, index=True, nullable=False, comment="file extension:folder|pdf")
|
|
file_size = Column(Integer, default=0, comment="file size(byte)")
|
|
file_url = Column(String, index=True, nullable=True, comment="file comes from a website url")
|
|
created_at = Column(DateTime, default=datetime.datetime.now) |