v20240522

package
v3.0.1296+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Operation failed.
	FAILEDOPERATION = "FailedOperation"

	//
	FAILEDOPERATION_FILEPARSEERROR = "FailedOperation.FileParseError"

	//
	FAILEDOPERATION_FILEPARSETIMEOUT = "FailedOperation.FileParseTimeout"

	//
	FAILEDOPERATION_INTERNALERROR = "FailedOperation.InternalError"

	// Internal error.
	INTERNALERROR = "InternalError"

	// Parameter error.
	INVALIDPARAMETER = "InvalidParameter"

	//
	INVALIDPARAMETER_FILEURLINVALID = "InvalidParameter.FileURLInvalid"

	//
	INVALIDPARAMETER_INVALIDFILEFORMAT = "InvalidParameter.InvalidFileFormat"

	//
	INVALIDPARAMETER_INVALIDFILETYPE = "InvalidParameter.InvalidFileType"

	// Exceeds the maximum file page limit.
	LIMITEXCEEDED_EXCEEDEDMAXPAGESERROR = "LimitExceeded.ExceededMaxPagesError"

	// File too large.
	LIMITEXCEEDED_TOOLARGEFILEERROR = "LimitExceeded.TooLargeFileError"

	// Too many and frequent requests.
	REQUESTLIMITEXCEEDED = "RequestLimitExceeded"

	// The account resource package is exhausted.
	RESOURCEUNAVAILABLE_RESOURCEPACKAGERUNOUT = "ResourceUnavailable.ResourcePackageRunOut"

	// The billing status is abnormal.
	RESOURCESSOLDOUT_CHARGESTATUSEXCEPTION = "ResourcesSoldOut.ChargeStatusException"
)
View Source
const APIVersion = "2024-05-22"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error)

func NewClientWithSecretId

func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error)

Deprecated

func (*Client) CreateReconstructDocumentFlow

func (c *Client) CreateReconstructDocumentFlow(request *CreateReconstructDocumentFlowRequest) (response *CreateReconstructDocumentFlowResponse, err error)

CreateReconstructDocumentFlow This API is used to initiate requests for this asynchronous API, for initiating document parsing tasks.

Document parsing supports converting images or PDF files into Markdown format files, and can parse content elements including tables, formulas, images, headings, paragraphs, headers, and footers, and intelligently convert the content into reading order. Please refer to the input parameter list below for specific supported file types.

During the trial period, the QPS limit for a single account is only 1. If you need to access officially, please contact our R&D team.

error code that may be returned:

FAILEDOPERATION = "FailedOperation"
FAILEDOPERATION_INTERNALERROR = "FailedOperation.InternalError"
INVALIDPARAMETER_FILEURLINVALID = "InvalidParameter.FileURLInvalid"
INVALIDPARAMETER_INVALIDFILEFORMAT = "InvalidParameter.InvalidFileFormat"
INVALIDPARAMETER_INVALIDFILETYPE = "InvalidParameter.InvalidFileType"
LIMITEXCEEDED_EXCEEDEDMAXPAGESERROR = "LimitExceeded.ExceededMaxPagesError"
LIMITEXCEEDED_TOOLARGEFILEERROR = "LimitExceeded.TooLargeFileError"
RESOURCEUNAVAILABLE_RESOURCEPACKAGERUNOUT = "ResourceUnavailable.ResourcePackageRunOut"
RESOURCESSOLDOUT_CHARGESTATUSEXCEPTION = "ResourcesSoldOut.ChargeStatusException"

func (*Client) CreateReconstructDocumentFlowWithContext

func (c *Client) CreateReconstructDocumentFlowWithContext(ctx context.Context, request *CreateReconstructDocumentFlowRequest) (response *CreateReconstructDocumentFlowResponse, err error)

CreateReconstructDocumentFlow This API is used to initiate requests for this asynchronous API, for initiating document parsing tasks.

Document parsing supports converting images or PDF files into Markdown format files, and can parse content elements including tables, formulas, images, headings, paragraphs, headers, and footers, and intelligently convert the content into reading order. Please refer to the input parameter list below for specific supported file types.

During the trial period, the QPS limit for a single account is only 1. If you need to access officially, please contact our R&D team.

error code that may be returned:

FAILEDOPERATION = "FailedOperation"
FAILEDOPERATION_INTERNALERROR = "FailedOperation.InternalError"
INVALIDPARAMETER_FILEURLINVALID = "InvalidParameter.FileURLInvalid"
INVALIDPARAMETER_INVALIDFILEFORMAT = "InvalidParameter.InvalidFileFormat"
INVALIDPARAMETER_INVALIDFILETYPE = "InvalidParameter.InvalidFileType"
LIMITEXCEEDED_EXCEEDEDMAXPAGESERROR = "LimitExceeded.ExceededMaxPagesError"
LIMITEXCEEDED_TOOLARGEFILEERROR = "LimitExceeded.TooLargeFileError"
RESOURCEUNAVAILABLE_RESOURCEPACKAGERUNOUT = "ResourceUnavailable.ResourcePackageRunOut"
RESOURCESSOLDOUT_CHARGESTATUSEXCEPTION = "ResourcesSoldOut.ChargeStatusException"

func (*Client) CreateSplitDocumentFlow

func (c *Client) CreateSplitDocumentFlow(request *CreateSplitDocumentFlowRequest) (response *CreateSplitDocumentFlowResponse, err error)

CreateSplitDocumentFlow This API is used to create document segmentation tasks, support various file types, possess mllm capacity, and can analyze and deeply understand the information in charts.

error code that may be returned:

FAILEDOPERATION = "FailedOperation"
INTERNALERROR = "InternalError"
INVALIDPARAMETER_FILEURLINVALID = "InvalidParameter.FileURLInvalid"
INVALIDPARAMETER_INVALIDFILEFORMAT = "InvalidParameter.InvalidFileFormat"
INVALIDPARAMETER_INVALIDFILETYPE = "InvalidParameter.InvalidFileType"
LIMITEXCEEDED_EXCEEDEDMAXPAGESERROR = "LimitExceeded.ExceededMaxPagesError"
LIMITEXCEEDED_TOOLARGEFILEERROR = "LimitExceeded.TooLargeFileError"
REQUESTLIMITEXCEEDED = "RequestLimitExceeded"
RESOURCEUNAVAILABLE_RESOURCEPACKAGERUNOUT = "ResourceUnavailable.ResourcePackageRunOut"

func (*Client) CreateSplitDocumentFlowWithContext

func (c *Client) CreateSplitDocumentFlowWithContext(ctx context.Context, request *CreateSplitDocumentFlowRequest) (response *CreateSplitDocumentFlowResponse, err error)

CreateSplitDocumentFlow This API is used to create document segmentation tasks, support various file types, possess mllm capacity, and can analyze and deeply understand the information in charts.

error code that may be returned:

FAILEDOPERATION = "FailedOperation"
INTERNALERROR = "InternalError"
INVALIDPARAMETER_FILEURLINVALID = "InvalidParameter.FileURLInvalid"
INVALIDPARAMETER_INVALIDFILEFORMAT = "InvalidParameter.InvalidFileFormat"
INVALIDPARAMETER_INVALIDFILETYPE = "InvalidParameter.InvalidFileType"
LIMITEXCEEDED_EXCEEDEDMAXPAGESERROR = "LimitExceeded.ExceededMaxPagesError"
LIMITEXCEEDED_TOOLARGEFILEERROR = "LimitExceeded.TooLargeFileError"
REQUESTLIMITEXCEEDED = "RequestLimitExceeded"
RESOURCEUNAVAILABLE_RESOURCEPACKAGERUNOUT = "ResourceUnavailable.ResourcePackageRunOut"

func (*Client) GetReconstructDocumentResult

func (c *Client) GetReconstructDocumentResult(request *GetReconstructDocumentResultRequest) (response *GetReconstructDocumentResultResponse, err error)

GetReconstructDocumentResult This is an asynchronous API for querying results, which is used to obtain the result of document parsing.

error code that may be returned:

FAILEDOPERATION_FILEPARSEERROR = "FailedOperation.FileParseError"
FAILEDOPERATION_FILEPARSETIMEOUT = "FailedOperation.FileParseTimeout"
FAILEDOPERATION_INTERNALERROR = "FailedOperation.InternalError"
INVALIDPARAMETER = "InvalidParameter"
INVALIDPARAMETER_FILEURLINVALID = "InvalidParameter.FileURLInvalid"
INVALIDPARAMETER_INVALIDFILEFORMAT = "InvalidParameter.InvalidFileFormat"
INVALIDPARAMETER_INVALIDFILETYPE = "InvalidParameter.InvalidFileType"
REQUESTLIMITEXCEEDED = "RequestLimitExceeded"
RESOURCEUNAVAILABLE_RESOURCEPACKAGERUNOUT = "ResourceUnavailable.ResourcePackageRunOut"
RESOURCESSOLDOUT_CHARGESTATUSEXCEPTION = "ResourcesSoldOut.ChargeStatusException"

func (*Client) GetReconstructDocumentResultWithContext

func (c *Client) GetReconstructDocumentResultWithContext(ctx context.Context, request *GetReconstructDocumentResultRequest) (response *GetReconstructDocumentResultResponse, err error)

GetReconstructDocumentResult This is an asynchronous API for querying results, which is used to obtain the result of document parsing.

error code that may be returned:

FAILEDOPERATION_FILEPARSEERROR = "FailedOperation.FileParseError"
FAILEDOPERATION_FILEPARSETIMEOUT = "FailedOperation.FileParseTimeout"
FAILEDOPERATION_INTERNALERROR = "FailedOperation.InternalError"
INVALIDPARAMETER = "InvalidParameter"
INVALIDPARAMETER_FILEURLINVALID = "InvalidParameter.FileURLInvalid"
INVALIDPARAMETER_INVALIDFILEFORMAT = "InvalidParameter.InvalidFileFormat"
INVALIDPARAMETER_INVALIDFILETYPE = "InvalidParameter.InvalidFileType"
REQUESTLIMITEXCEEDED = "RequestLimitExceeded"
RESOURCEUNAVAILABLE_RESOURCEPACKAGERUNOUT = "ResourceUnavailable.ResourcePackageRunOut"
RESOURCESSOLDOUT_CHARGESTATUSEXCEPTION = "ResourcesSoldOut.ChargeStatusException"

func (*Client) GetSplitDocumentResult

func (c *Client) GetSplitDocumentResult(request *GetSplitDocumentResultRequest) (response *GetSplitDocumentResultResponse, err error)

GetSplitDocumentResult This API is used to query the results of document splitting tasks.

error code that may be returned:

FAILEDOPERATION_FILEPARSEERROR = "FailedOperation.FileParseError"
FAILEDOPERATION_FILEPARSETIMEOUT = "FailedOperation.FileParseTimeout"
FAILEDOPERATION_INTERNALERROR = "FailedOperation.InternalError"
INVALIDPARAMETER_FILEURLINVALID = "InvalidParameter.FileURLInvalid"
INVALIDPARAMETER_INVALIDFILEFORMAT = "InvalidParameter.InvalidFileFormat"
INVALIDPARAMETER_INVALIDFILETYPE = "InvalidParameter.InvalidFileType"
REQUESTLIMITEXCEEDED = "RequestLimitExceeded"
RESOURCEUNAVAILABLE_RESOURCEPACKAGERUNOUT = "ResourceUnavailable.ResourcePackageRunOut"
RESOURCESSOLDOUT_CHARGESTATUSEXCEPTION = "ResourcesSoldOut.ChargeStatusException"

func (*Client) GetSplitDocumentResultWithContext

func (c *Client) GetSplitDocumentResultWithContext(ctx context.Context, request *GetSplitDocumentResultRequest) (response *GetSplitDocumentResultResponse, err error)

GetSplitDocumentResult This API is used to query the results of document splitting tasks.

error code that may be returned:

FAILEDOPERATION_FILEPARSEERROR = "FailedOperation.FileParseError"
FAILEDOPERATION_FILEPARSETIMEOUT = "FailedOperation.FileParseTimeout"
FAILEDOPERATION_INTERNALERROR = "FailedOperation.InternalError"
INVALIDPARAMETER_FILEURLINVALID = "InvalidParameter.FileURLInvalid"
INVALIDPARAMETER_INVALIDFILEFORMAT = "InvalidParameter.InvalidFileFormat"
INVALIDPARAMETER_INVALIDFILETYPE = "InvalidParameter.InvalidFileType"
REQUESTLIMITEXCEEDED = "RequestLimitExceeded"
RESOURCEUNAVAILABLE_RESOURCEPACKAGERUNOUT = "ResourceUnavailable.ResourcePackageRunOut"
RESOURCESSOLDOUT_CHARGESTATUSEXCEPTION = "ResourcesSoldOut.ChargeStatusException"

func (*Client) QueryRewrite

func (c *Client) QueryRewrite(request *QueryRewriteRequest) (response *QueryRewriteResponse, err error)

QueryRewrite QueryRewrite is mainly used in multi-round conversations for reference resolution and ellipsis completion. Using this API, you don't need to input prompt descriptions. A more accurate user query can be generated based on the conversation history. In terms of application scenarios, this API can be applied to various scenarios such as intelligent Q&A and conversational search.

There is a call limit for single-account for this API. If you need to increase the concurrency limit, please contact us (https://cloud.tencent.com/act/event/Online_service).

error code that may be returned:

FAILEDOPERATION = "FailedOperation"

func (*Client) QueryRewriteWithContext

func (c *Client) QueryRewriteWithContext(ctx context.Context, request *QueryRewriteRequest) (response *QueryRewriteResponse, err error)

QueryRewrite QueryRewrite is mainly used in multi-round conversations for reference resolution and ellipsis completion. Using this API, you don't need to input prompt descriptions. A more accurate user query can be generated based on the conversation history. In terms of application scenarios, this API can be applied to various scenarios such as intelligent Q&A and conversational search.

There is a call limit for single-account for this API. If you need to increase the concurrency limit, please contact us (https://cloud.tencent.com/act/event/Online_service).

error code that may be returned:

FAILEDOPERATION = "FailedOperation"

func (*Client) RunRerank

func (c *Client) RunRerank(request *RunRerankRequest) (response *RunRerankResponse, err error)

RunRerank This API is used to reorder the results of multi-channel recall based on the rerank model of knowledge engine fine-tuning model technology, sort the segments according to the relevance between the query and the segment content from high to low score, and output the corresponding scoring results.

error code that may be returned:

FAILEDOPERATION = "FailedOperation"

func (*Client) RunRerankWithContext

func (c *Client) RunRerankWithContext(ctx context.Context, request *RunRerankRequest) (response *RunRerankResponse, err error)

RunRerank This API is used to reorder the results of multi-channel recall based on the rerank model of knowledge engine fine-tuning model technology, sort the segments according to the relevance between the query and the segment content from high to low score, and output the corresponding scoring results.

error code that may be returned:

FAILEDOPERATION = "FailedOperation"

type CreateReconstructDocumentFlowConfig

type CreateReconstructDocumentFlowConfig struct {
	// The form in which tables in a Markdown file are returned.
	// - 0: returned as MD.
	// - 1: returned as HTML.
	// The default is 0.
	TableResultType *string `json:"TableResultType,omitnil,omitempty" name:"TableResultType"`

	// The format of the returned results of intelligent document parsing.
	// - 0: only returns full-text MD.
	// - 1: only returns the OCR original Json for each page.
	// - 2: only returns the MD of each page.
	// - 3: returns the full-text MD and the original OCR Json of each page.
	// - 4: returns full-text MD and MD of each page.
	// The default value is 3 (returns the full-text MD and the original OCR Json of each page).
	ResultType *string `json:"ResultType,omitnil,omitempty" name:"ResultType"`
}

type CreateReconstructDocumentFlowRequest

type CreateReconstructDocumentFlowRequest struct {
	*tchttp.BaseRequest

	// File type.
	// **Supported file types**: PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, MD, TXT, PNG, JPG, JPEG, CSV, HTML, EPUB, BMP, GIF, WEBP, HEIC, EPS, ICNS, IM, PCX, PPM, TIFF, XBM, HEIF, JP2.
	// **Supported file sizes**:
	// - Max 100 MB for PDF.
	// - Max 200 MB for DOC, DOCX, PPT, and PPTX .
	// - Max 10 MB for MD, and TXT.
	// - Max 20 MB for others.
	FileType *string `json:"FileType,omitnil,omitempty" name:"FileType"`

	// File URL. It is recommended to store the file in Tencent Cloud as the URL where the file is stored in Tencent Cloud can ensure higher download speed and stability. External URL may affect the speed and stability. Refer to: [Tencent Cloud COS Documentation](https://cloud.tencent.com/document/product/436/7749)
	FileUrl *string `json:"FileUrl,omitnil,omitempty" name:"FileUrl"`

	// The base64 value of the file. Supported file types: PNG, JPG, JPEG, PDF, BMP, TIFF. File size limit: the downloaded file does not exceed 8MB after base64 encoding. File download time does not exceed 3 seconds. Supported image pixels: the length of a single side is between 20-10000px. Either FileUrl or FileBase64 of the file must be provided. If both are provided, only the FileUrl is used.
	FileBase64 *string `json:"FileBase64,omitnil,omitempty" name:"FileBase64"`

	// The starting page number of the file. When type of the uploaded file is pdf, doc, ppt, or pptx, it specifies the starting page number for recognition, including the current value.
	FileStartPageNumber *int64 `json:"FileStartPageNumber,omitnil,omitempty" name:"FileStartPageNumber"`

	// The end page number of the file. When type of the uploaded file is pdf, doc, ppt, or pptx, it specifies the end page number for recognition, including the current value.
	FileEndPageNumber *int64 `json:"FileEndPageNumber,omitnil,omitempty" name:"FileEndPageNumber"`

	// Creates task configuration information for document parsing.
	Config *CreateReconstructDocumentFlowConfig `json:"Config,omitnil,omitempty" name:"Config"`
}

func NewCreateReconstructDocumentFlowRequest

func NewCreateReconstructDocumentFlowRequest() (request *CreateReconstructDocumentFlowRequest)

func (*CreateReconstructDocumentFlowRequest) FromJsonString

func (r *CreateReconstructDocumentFlowRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*CreateReconstructDocumentFlowRequest) ToJsonString

func (r *CreateReconstructDocumentFlowRequest) ToJsonString() string

type CreateReconstructDocumentFlowRequestParams

type CreateReconstructDocumentFlowRequestParams struct {
	// File type.
	// **Supported file types**: PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, MD, TXT, PNG, JPG, JPEG, CSV, HTML, EPUB, BMP, GIF, WEBP, HEIC, EPS, ICNS, IM, PCX, PPM, TIFF, XBM, HEIF, JP2.
	// **Supported file sizes**:
	// - Max 100 MB for PDF.
	// - Max 200 MB for DOC, DOCX, PPT, and PPTX .
	// - Max 10 MB for MD, and TXT.
	// - Max 20 MB for others.
	FileType *string `json:"FileType,omitnil,omitempty" name:"FileType"`

	// File URL. It is recommended to store the file in Tencent Cloud as the URL where the file is stored in Tencent Cloud can ensure higher download speed and stability. External URL may affect the speed and stability. Refer to: [Tencent Cloud COS Documentation](https://cloud.tencent.com/document/product/436/7749)
	FileUrl *string `json:"FileUrl,omitnil,omitempty" name:"FileUrl"`

	// The base64 value of the file. Supported file types: PNG, JPG, JPEG, PDF, BMP, TIFF. File size limit: the downloaded file does not exceed 8MB after base64 encoding. File download time does not exceed 3 seconds. Supported image pixels: the length of a single side is between 20-10000px. Either FileUrl or FileBase64 of the file must be provided. If both are provided, only the FileUrl is used.
	FileBase64 *string `json:"FileBase64,omitnil,omitempty" name:"FileBase64"`

	// The starting page number of the file. When type of the uploaded file is pdf, doc, ppt, or pptx, it specifies the starting page number for recognition, including the current value.
	FileStartPageNumber *int64 `json:"FileStartPageNumber,omitnil,omitempty" name:"FileStartPageNumber"`

	// The end page number of the file. When type of the uploaded file is pdf, doc, ppt, or pptx, it specifies the end page number for recognition, including the current value.
	FileEndPageNumber *int64 `json:"FileEndPageNumber,omitnil,omitempty" name:"FileEndPageNumber"`

	// Creates task configuration information for document parsing.
	Config *CreateReconstructDocumentFlowConfig `json:"Config,omitnil,omitempty" name:"Config"`
}

Predefined struct for user

type CreateReconstructDocumentFlowResponse

type CreateReconstructDocumentFlowResponse struct {
	*tchttp.BaseResponse
	Response *CreateReconstructDocumentFlowResponseParams `json:"Response"`
}

func NewCreateReconstructDocumentFlowResponse

func NewCreateReconstructDocumentFlowResponse() (response *CreateReconstructDocumentFlowResponse)

func (*CreateReconstructDocumentFlowResponse) FromJsonString

func (r *CreateReconstructDocumentFlowResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*CreateReconstructDocumentFlowResponse) ToJsonString

type CreateReconstructDocumentFlowResponseParams

type CreateReconstructDocumentFlowResponseParams struct {
	// Unique task ID. The processing result corresponding to TaskId can be queried through the API [GetReconstructDocumentResult] within 30 days.
	TaskId *string `json:"TaskId,omitnil,omitempty" name:"TaskId"`

	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

Predefined struct for user

type CreateSplitDocumentFlowConfig

type CreateSplitDocumentFlowConfig struct {
	// The form in which tables in a Markdown file are returned.
	// - 0: returned as MD.
	// - 1: returned as HTML.
	//
	// Deprecated: TableResultType is deprecated.
	TableResultType *string `json:"TableResultType,omitnil,omitempty" name:"TableResultType"`

	// The format of the returned results of intelligent document parsing.
	// - 0: only returns full-text MD.
	// - 1: only returns the OCR original Json for each page.
	// - 2: only returns the MD of each page.
	// - 3: returns the full-text MD and the original OCR Json of each page.
	// - 4: returns full-text MD and MD of each page.
	// The default value is 3 (returns the full-text MD and the original OCR Json of each page).
	//
	// Deprecated: ResultType is deprecated.
	ResultType *string `json:"ResultType,omitnil,omitempty" name:"ResultType"`

	// Whether to enable mllm.
	EnableMllm *bool `json:"EnableMllm,omitnil,omitempty" name:"EnableMllm"`

	// Max segment length.
	MaxChunkSize *int64 `json:"MaxChunkSize,omitnil,omitempty" name:"MaxChunkSize"`
}

type CreateSplitDocumentFlowRequest

type CreateSplitDocumentFlowRequest struct {
	*tchttp.BaseRequest

	// File type.
	// **Supported file types**: PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, MD, TXT, PNG, JPG, JPEG, CSV, HTML, EPUB.
	// **Supported file sizes**:
	// - Max 500 MB for PDF.
	// - Max 200 MB for DOC, DOCX, PPT, and PPTX .
	// - Max 10 MB for MD, and TXT.
	// - Max 20 MB for others.
	FileType *string `json:"FileType,omitnil,omitempty" name:"FileType"`

	// File URL. It is recommended to store the file in Tencent Cloud as the URL where the file is stored in Tencent Cloud can ensure higher download speed and stability. External URL may affect the speed and stability.
	// Refer to: [Tencent Cloud COS Documentation](https://cloud.tencent.com/document/product/436/7749).
	FileUrl *string `json:"FileUrl,omitnil,omitempty" name:"FileUrl"`

	// Filename. optional.
	// **The file type suffix shall be included**. This field is required to be specified when the file name cannot be obtained from the passed-in "FileUrl".
	FileName *string `json:"FileName,omitnil,omitempty" name:"FileName"`

	// The base64 value of the file. File size limit: the downloaded file shall not exceed 8MB after base64 encoding. File download time does not exceed 3 seconds. Supported image pixels: the length of a single side is between 20-10000px. Either FileUrl or FileBase64 of the file must be provided. If both are provided, only the FileUrl is used.
	FileBase64 *string `json:"FileBase64,omitnil,omitempty" name:"FileBase64"`

	// The starting page number of the file. When type of the uploaded file is pdf, doc, ppt, or pptx, it specifies the starting page number for recognition, including the current value.
	FileStartPageNumber *int64 `json:"FileStartPageNumber,omitnil,omitempty" name:"FileStartPageNumber"`

	// The end page number of the file. When type of the uploaded file is pdf, doc, ppt, or pptx, it specifies the end page number for recognition, including the current value.
	FileEndPageNumber *int64 `json:"FileEndPageNumber,omitnil,omitempty" name:"FileEndPageNumber"`

	// Configuration message for document splitting task.
	Config *CreateSplitDocumentFlowConfig `json:"Config,omitnil,omitempty" name:"Config"`
}

func NewCreateSplitDocumentFlowRequest

func NewCreateSplitDocumentFlowRequest() (request *CreateSplitDocumentFlowRequest)

func (*CreateSplitDocumentFlowRequest) FromJsonString

func (r *CreateSplitDocumentFlowRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*CreateSplitDocumentFlowRequest) ToJsonString

func (r *CreateSplitDocumentFlowRequest) ToJsonString() string

type CreateSplitDocumentFlowRequestParams

type CreateSplitDocumentFlowRequestParams struct {
	// File type.
	// **Supported file types**: PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, MD, TXT, PNG, JPG, JPEG, CSV, HTML, EPUB.
	// **Supported file sizes**:
	// - Max 500 MB for PDF.
	// - Max 200 MB for DOC, DOCX, PPT, and PPTX .
	// - Max 10 MB for MD, and TXT.
	// - Max 20 MB for others.
	FileType *string `json:"FileType,omitnil,omitempty" name:"FileType"`

	// File URL. It is recommended to store the file in Tencent Cloud as the URL where the file is stored in Tencent Cloud can ensure higher download speed and stability. External URL may affect the speed and stability.
	// Refer to: [Tencent Cloud COS Documentation](https://cloud.tencent.com/document/product/436/7749).
	FileUrl *string `json:"FileUrl,omitnil,omitempty" name:"FileUrl"`

	// Filename. optional.
	// **The file type suffix shall be included**. This field is required to be specified when the file name cannot be obtained from the passed-in "FileUrl".
	FileName *string `json:"FileName,omitnil,omitempty" name:"FileName"`

	// The base64 value of the file. File size limit: the downloaded file shall not exceed 8MB after base64 encoding. File download time does not exceed 3 seconds. Supported image pixels: the length of a single side is between 20-10000px. Either FileUrl or FileBase64 of the file must be provided. If both are provided, only the FileUrl is used.
	//
	// Deprecated: FileBase64 is deprecated.
	FileBase64 *string `json:"FileBase64,omitnil,omitempty" name:"FileBase64"`

	// The starting page number of the file. When type of the uploaded file is pdf, doc, ppt, or pptx, it specifies the starting page number for recognition, including the current value.
	FileStartPageNumber *int64 `json:"FileStartPageNumber,omitnil,omitempty" name:"FileStartPageNumber"`

	// The end page number of the file. When type of the uploaded file is pdf, doc, ppt, or pptx, it specifies the end page number for recognition, including the current value.
	FileEndPageNumber *int64 `json:"FileEndPageNumber,omitnil,omitempty" name:"FileEndPageNumber"`

	// Configuration message for document splitting task.
	Config *CreateSplitDocumentFlowConfig `json:"Config,omitnil,omitempty" name:"Config"`
}

Predefined struct for user

type CreateSplitDocumentFlowResponse

type CreateSplitDocumentFlowResponse struct {
	*tchttp.BaseResponse
	Response *CreateSplitDocumentFlowResponseParams `json:"Response"`
}

func NewCreateSplitDocumentFlowResponse

func NewCreateSplitDocumentFlowResponse() (response *CreateSplitDocumentFlowResponse)

func (*CreateSplitDocumentFlowResponse) FromJsonString

func (r *CreateSplitDocumentFlowResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*CreateSplitDocumentFlowResponse) ToJsonString

func (r *CreateSplitDocumentFlowResponse) ToJsonString() string

type CreateSplitDocumentFlowResponseParams

type CreateSplitDocumentFlowResponseParams struct {
	// The unique ID of the splitting task.
	// The splitting results corresponding to the TaskId can be queried through the [GetSplitDocumentResult] API within 30 days.
	TaskId *string `json:"TaskId,omitnil,omitempty" name:"TaskId"`

	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

Predefined struct for user

type DocumentUsage

type DocumentUsage struct {
	// Page number of the document splitting task.
	PageNumber *int64 `json:"PageNumber,omitnil,omitempty" name:"PageNumber"`

	// Total number of tokens consumed by the document splitting task.
	//
	// Deprecated: TotalToken is deprecated.
	TotalToken *int64 `json:"TotalToken,omitnil,omitempty" name:"TotalToken"`

	// Total number of tokens consumed by the document splitting task.
	TotalTokens *int64 `json:"TotalTokens,omitnil,omitempty" name:"TotalTokens"`
}

type GetReconstructDocumentResultRequest

type GetReconstructDocumentResultRequest struct {
	*tchttp.BaseRequest

	// Parsing task ID.
	TaskId *string `json:"TaskId,omitnil,omitempty" name:"TaskId"`
}

func NewGetReconstructDocumentResultRequest

func NewGetReconstructDocumentResultRequest() (request *GetReconstructDocumentResultRequest)

func (*GetReconstructDocumentResultRequest) FromJsonString

func (r *GetReconstructDocumentResultRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*GetReconstructDocumentResultRequest) ToJsonString

func (r *GetReconstructDocumentResultRequest) ToJsonString() string

type GetReconstructDocumentResultRequestParams

type GetReconstructDocumentResultRequestParams struct {
	// Parsing task ID.
	TaskId *string `json:"TaskId,omitnil,omitempty" name:"TaskId"`
}

Predefined struct for user

type GetReconstructDocumentResultResponse

type GetReconstructDocumentResultResponse struct {
	*tchttp.BaseResponse
	Response *GetReconstructDocumentResultResponseParams `json:"Response"`
}

func NewGetReconstructDocumentResultResponse

func NewGetReconstructDocumentResultResponse() (response *GetReconstructDocumentResultResponse)

func (*GetReconstructDocumentResultResponse) FromJsonString

func (r *GetReconstructDocumentResultResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*GetReconstructDocumentResultResponse) ToJsonString

func (r *GetReconstructDocumentResultResponse) ToJsonString() string

type GetReconstructDocumentResultResponseParams

type GetReconstructDocumentResultResponseParams struct {
	// Task status.
	// -Success: execution completed.
	// -Processing: executing.
	// -Pause: paused.
	// -Failed: execution failed.
	// -WaitExecute: pending execution.
	Status *string `json:"Status,omitnil,omitempty" name:"Status"`

	// Temporary download URL for the parsing result. The file is a zip compressed package, and the URL is valid for 30 minutes.
	DocumentRecognizeResultUrl *string `json:"DocumentRecognizeResultUrl,omitnil,omitempty" name:"DocumentRecognizeResultUrl"`

	// Page number where document parsing fails.
	FailedPages []*ReconstructDocumentFailedPage `json:"FailedPages,omitnil,omitempty" name:"FailedPages"`

	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

Predefined struct for user

type GetSplitDocumentResultRequest

type GetSplitDocumentResultRequest struct {
	*tchttp.BaseRequest

	// Splitting task ID.
	TaskId *string `json:"TaskId,omitnil,omitempty" name:"TaskId"`
}

func NewGetSplitDocumentResultRequest

func NewGetSplitDocumentResultRequest() (request *GetSplitDocumentResultRequest)

func (*GetSplitDocumentResultRequest) FromJsonString

func (r *GetSplitDocumentResultRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*GetSplitDocumentResultRequest) ToJsonString

func (r *GetSplitDocumentResultRequest) ToJsonString() string

type GetSplitDocumentResultRequestParams

type GetSplitDocumentResultRequestParams struct {
	// Splitting task ID.
	TaskId *string `json:"TaskId,omitnil,omitempty" name:"TaskId"`
}

Predefined struct for user

type GetSplitDocumentResultResponse

type GetSplitDocumentResultResponse struct {
	*tchttp.BaseResponse
	Response *GetSplitDocumentResultResponseParams `json:"Response"`
}

func NewGetSplitDocumentResultResponse

func NewGetSplitDocumentResultResponse() (response *GetSplitDocumentResultResponse)

func (*GetSplitDocumentResultResponse) FromJsonString

func (r *GetSplitDocumentResultResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*GetSplitDocumentResultResponse) ToJsonString

func (r *GetSplitDocumentResultResponse) ToJsonString() string

type GetSplitDocumentResultResponseParams

type GetSplitDocumentResultResponseParams struct {
	// Task status:
	// -Success: execution completed.
	// -Processing: executing.
	// -Pause: paused.
	// -Failed: execution failed.
	// -WaitExecute: pending execution.
	Status *string `json:"Status,omitnil,omitempty" name:"Status"`

	// Temporary download URL for the splitting result. The file is a zip compressed package, and the URL is valid for 30 minutes. The compressed package contains the following folders: \*.md, \*.jsonl, \*mllm.json, images.
	// >**jsonl** structure description:.
	// - page_content: Used to generate an embedding library for retrieval purposes. The images in this field will be replaced with placeholders.
	// - org_data: The minimum semantic integrity block corresponding to page_content, used for Q&A model processing.
	// - big_data: The maximum semantic integrity block corresponding to page_content, also used for Q&A model processing.
	DocumentRecognizeResultUrl *string `json:"DocumentRecognizeResultUrl,omitnil,omitempty" name:"DocumentRecognizeResultUrl"`

	// Page number where document splitting fails.
	//
	// Deprecated: FailedPages is deprecated.
	FailedPages []*SplitDocumentFailedPage `json:"FailedPages,omitnil,omitempty" name:"FailedPages"`

	// Amount of the document split task.
	Usage *DocumentUsage `json:"Usage,omitnil,omitempty" name:"Usage"`

	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

Predefined struct for user

type Message

type Message struct {
	// Role.
	Role *string `json:"Role,omitnil,omitempty" name:"Role"`

	// Content.
	Content *string `json:"Content,omitnil,omitempty" name:"Content"`

	// Chain of thought content. The ReasoningConent parameter only supports output parameters, and is only returned by the deepseek-r1 model.
	ReasoningContent *string `json:"ReasoningContent,omitnil,omitempty" name:"ReasoningContent"`
}

type QueryRewriteRequest

type QueryRewriteRequest struct {
	*tchttp.BaseRequest

	// The multi-round historical conversation that needs to be rewritten. Each round of historical conversation should include paired inputs of user (question) and assistant (answer). Due to the character limit of the model, a maximum of 4 rounds of conversations can be provided. The last round of conversation will be rewritten.
	Messages []*Message `json:"Messages,omitnil,omitempty" name:"Messages"`

	// Model name.
	Model *string `json:"Model,omitnil,omitempty" name:"Model"`
}

func NewQueryRewriteRequest

func NewQueryRewriteRequest() (request *QueryRewriteRequest)

func (*QueryRewriteRequest) FromJsonString

func (r *QueryRewriteRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*QueryRewriteRequest) ToJsonString

func (r *QueryRewriteRequest) ToJsonString() string

type QueryRewriteRequestParams

type QueryRewriteRequestParams struct {
	// The multi-round historical conversation that needs to be rewritten. Each round of historical conversation should include paired inputs of user (question) and assistant (answer). Due to the character limit of the model, a maximum of 4 rounds of conversations can be provided. The last round of conversation will be rewritten.
	Messages []*Message `json:"Messages,omitnil,omitempty" name:"Messages"`

	// Model name.
	Model *string `json:"Model,omitnil,omitempty" name:"Model"`
}

Predefined struct for user

type QueryRewriteResponse

type QueryRewriteResponse struct {
	*tchttp.BaseResponse
	Response *QueryRewriteResponseParams `json:"Response"`
}

func NewQueryRewriteResponse

func NewQueryRewriteResponse() (response *QueryRewriteResponse)

func (*QueryRewriteResponse) FromJsonString

func (r *QueryRewriteResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*QueryRewriteResponse) ToJsonString

func (r *QueryRewriteResponse) ToJsonString() string

type QueryRewriteResponseParams

type QueryRewriteResponseParams struct {
	// Rewritten result.
	Content *string `json:"Content,omitnil,omitempty" name:"Content"`

	// Consumption. The numbers of input tokens, output tokens, and total tokens will be returned.
	Usage *Usage `json:"Usage,omitnil,omitempty" name:"Usage"`

	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

Predefined struct for user

type ReconstructDocumentFailedPage

type ReconstructDocumentFailedPage struct {
	// Page number that failed to parse.
	PageNumber *int64 `json:"PageNumber,omitnil,omitempty" name:"PageNumber"`
}

type RunRerankRequest

type RunRerankRequest struct {
	*tchttp.BaseRequest

	// Query content.
	Query *string `json:"Query,omitnil,omitempty" name:"Query"`

	// Document list, up to 20 documents.
	Docs []*string `json:"Docs,omitnil,omitempty" name:"Docs"`

	// Model name. Default: lke-reranker-base.
	Model *string `json:"Model,omitnil,omitempty" name:"Model"`
}

func NewRunRerankRequest

func NewRunRerankRequest() (request *RunRerankRequest)

func (*RunRerankRequest) FromJsonString

func (r *RunRerankRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*RunRerankRequest) ToJsonString

func (r *RunRerankRequest) ToJsonString() string

type RunRerankRequestParams

type RunRerankRequestParams struct {
	// Query content.
	Query *string `json:"Query,omitnil,omitempty" name:"Query"`

	// Document list, up to 20 documents.
	Docs []*string `json:"Docs,omitnil,omitempty" name:"Docs"`

	// Model name. Default: lke-reranker-base.
	Model *string `json:"Model,omitnil,omitempty" name:"Model"`
}

Predefined struct for user

type RunRerankResponse

type RunRerankResponse struct {
	*tchttp.BaseResponse
	Response *RunRerankResponseParams `json:"Response"`
}

func NewRunRerankResponse

func NewRunRerankResponse() (response *RunRerankResponse)

func (*RunRerankResponse) FromJsonString

func (r *RunRerankResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*RunRerankResponse) ToJsonString

func (r *RunRerankResponse) ToJsonString() string

type RunRerankResponseParams

type RunRerankResponseParams struct {
	// Relevance. A higher numeric value indicates greater relevance.
	ScoreList []*float64 `json:"ScoreList,omitnil,omitempty" name:"ScoreList"`

	// Consumption. Only returns TotalToken.
	Usage *Usage `json:"Usage,omitnil,omitempty" name:"Usage"`

	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

Predefined struct for user

type SplitDocumentFailedPage

type SplitDocumentFailedPage struct {
	// Page number that failed to parse.
	PageNumber *int64 `json:"PageNumber,omitnil,omitempty" name:"PageNumber"`
}

type Usage

type Usage struct {
	// Number of document pages.
	TotalPages *int64 `json:"TotalPages,omitnil,omitempty" name:"TotalPages"`

	// Number of input tokens.
	InputTokens *int64 `json:"InputTokens,omitnil,omitempty" name:"InputTokens"`

	// Number of output tokens.
	OutputTokens *int64 `json:"OutputTokens,omitnil,omitempty" name:"OutputTokens"`

	// Total number of tokens.
	TotalTokens *int64 `json:"TotalTokens,omitnil,omitempty" name:"TotalTokens"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL