Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConvertToTextInput ¶
type ConvertToTextInput struct { // Doc: Document to convert Doc string `json:"doc"` }
ConvertToTextInput defines the input for convert to text task
type ConvertToTextOutput ¶
type ConvertToTextOutput struct { // Body: Plain text converted from the document Body string `json:"body"` // Meta: Metadata extracted from the document Meta map[string]string `json:"meta"` // MSecs: Time taken to convert the document MSecs uint32 `json:"msecs"` // Error: Error message if any during the conversion process Error string `json:"error"` }
ConvertToTextOutput defines the output for convert to text task
type SplitByTokenInput ¶
type SplitByTokenInput struct { // Text: Text to split Text string `json:"text"` // Model: ID of the model to use for tokenization Model string `json:"model"` // ChunkTokenSize: Number of tokens per text chunk ChunkTokenSize *int `json:"chunk_token_size,omitempty"` }
SplitByTokenInput defines the input for split by token task
type SplitByTokenOutput ¶
type SplitByTokenOutput struct { // TokenCount: Number of tokens in the text TokenCount int `json:"token_count"` // TextChunks: List of text chunks TextChunks []string `json:"text_chunks"` // ChunkNum: Number of text chunks ChunkNum int `json:"chunk_num"` }
SplitByTokenOutput defines the output for split by token task
Click to show internal directories.
Click to hide internal directories.