add_doc_info

Function

Adds a document record to a knowledge base. This operation can only be performed by the knowledge base administrator. Check the size of the database file before adding the file, which cannot exceed 100 GB. When adding a document record, ensure that the remaining drive partition space is greater than 200 MB.

Prototype

def add_doc_info(knowledge_name, doc_name, file_path, user_id)

Parameters

Parameter

Data Type

Required/Optional

Description

knowledge_name

String

Required

Knowledge base name. The length range is [1, 1024].

doc_name

String

Required

Document name. The length range is [1, 1024].

file_path

String

Required

Document upload path, which is stored in the database. The path length range is [1, 1024].

user_id

String

Required

User ID, which is used to distinguish different knowledge bases and must comply with the regular expression ^[a-zA-Z0-9_-]{6,64}$.

Return Value

Data Type

Description

Integer

ID of the document that is added to document_table