@intuned/sdk-dev-types
Advanced tools
Comparing version 1.0.5-rami-testing-response-view-6 to 1.0.6-beta.1-download-proxy-1
@@ -9,3 +9,3 @@ import { Locator, Page } from "@intuned/playwright-core"; | ||
* @param options.prompt optional, a prompt to guide the extraction process and provide more context. | ||
* @param options.strategy optional, the strategy to use for extraction, currently, only `MARKDOWN` is supported. The file will be converted to markdown and then the data will be extracted from it. | ||
* @param options.strategy optional, the strategy to use for extraction. use `IMAGE` if the info you're trying to extract is visual and cannot be converted to markdown. Defaults to `MARKDOWN` strategy with `gpt4-turbo` model. | ||
* @example | ||
@@ -43,3 +43,3 @@ * ```typescript extractStructuredDataFromFile | ||
export declare function extractStructuredDataFromFile( | ||
file: ImageFile | PdfFile, | ||
file: ImageFile | PdfFile | SpreadsheetFile, | ||
options: { | ||
@@ -49,13 +49,3 @@ label: string; | ||
prompt?: string; | ||
strategy?: { | ||
type: "MARKDOWN"; | ||
model: | ||
| "claude-3-opus" | ||
| "claude-3-sonnet" | ||
| "claude-3.5-sonnet" | ||
| "claude-3-haiku" | ||
| "gpt4-turbo" | ||
| "gpt-4o" | ||
| "gpt3.5-turbo"; | ||
}; | ||
strategy?: MarkdownFileStrategy | ImageFileStrategy; | ||
} | ||
@@ -127,2 +117,17 @@ ): Promise<any>; | ||
/** | ||
* Represents a Spreadsheet file source. For now, only Excel spreadsheets are supported. | ||
* | ||
* @interface | ||
* @property type - The type of the file, which is always "spreadsheet". | ||
* @property sheetName - The name of the sheet to extract data from. | ||
* @property source - The source of the file data. | ||
* @property config - Optional. Configurations on how the spreadsheet should be processed when it is converted to a document. | ||
*/ | ||
export interface SpreadsheetFile { | ||
type: "spreadsheet"; | ||
sheetName: string; | ||
source: FileBufferSource | FileUrlSource | FileBase64Source; | ||
} | ||
/** | ||
* Extracts tables from a file (ImageFile or PdfFile). | ||
@@ -154,3 +159,3 @@ * | ||
export declare function extractTablesFromFile( | ||
file: ImageFile | PdfFile, | ||
file: ImageFile | PdfFile | SpreadsheetFile, | ||
options: { | ||
@@ -200,3 +205,3 @@ label: string; | ||
export declare function extractMarkdownFromFile( | ||
file: ImageFile | PdfFile, | ||
file: ImageFile | PdfFile | SpreadsheetFile, | ||
options: { | ||
@@ -303,8 +308,14 @@ label: string; | ||
model: | ||
| "claude-3-haiku" | ||
| "claude-3-haiku-20240307" | ||
| "claude-3-opus" | ||
| "claude-3-opus-20240229" | ||
| "claude-3-sonnet" | ||
| "claude-3-sonnet-20240229" | ||
| "claude-3.5-sonnet" | ||
| "claude-3-haiku" | ||
| "claude-3-5-sonnet-20240620" | ||
| "gpt4-turbo" | ||
| "gpt-4o"; | ||
| "gpt-4-turbo-2024-04-09" | ||
| "gpt-4o" | ||
| "gpt-4o-2024-05-13"; | ||
type: "IMAGE"; | ||
@@ -323,9 +334,16 @@ } | ||
model: | ||
| "claude-3-haiku" | ||
| "claude-3-haiku-20240307" | ||
| "claude-3-opus" | ||
| "claude-3-opus-20240229" | ||
| "claude-3-sonnet" | ||
| "claude-3-sonnet-20240229" | ||
| "claude-3.5-sonnet" | ||
| "claude-3-haiku" | ||
| "claude-3-5-sonnet-20240620" | ||
| "gpt4-turbo" | ||
| "gpt-4-turbo-2024-04-09" | ||
| "gpt3.5-turbo" | ||
| "gpt-4o"; | ||
| "gpt-3.5-turbo-0125" | ||
| "gpt-4o" | ||
| "gpt-4o-2024-05-13"; | ||
type: "HTML"; | ||
@@ -335,2 +353,52 @@ } | ||
/** | ||
* this strategy will extract markdown content from the file then run data extraction on it. | ||
* | ||
* @interface | ||
* @property model - the model to use in the extraction process | ||
* @property type - the type of the strategy | ||
*/ | ||
export interface MarkdownFileStrategy { | ||
model: | ||
| "claude-3-haiku" | ||
| "claude-3-haiku-20240307" | ||
| "claude-3-opus" | ||
| "claude-3-opus-20240229" | ||
| "claude-3-sonnet" | ||
| "claude-3-sonnet-20240229" | ||
| "claude-3.5-sonnet" | ||
| "claude-3-5-sonnet-20240620" | ||
| "gpt4-turbo" | ||
| "gpt-4-turbo-2024-04-09" | ||
| "gpt3.5-turbo" | ||
| "gpt-3.5-turbo-0125" | ||
| "gpt-4o" | ||
| "gpt-4o-2024-05-13"; | ||
type: "MARKDOWN"; | ||
} | ||
/** | ||
* this strategy will use the image content of the file to extract the needed data. | ||
* should be used when the information you're trying to extract cannot be converted to markdown. For example, a checkbox in a pdf file. | ||
* @interface | ||
* @property model - the model to use in the extraction process. | ||
* @property type - the type of the strategy | ||
*/ | ||
export interface ImageFileStrategy { | ||
model: | ||
| "claude-3-haiku" | ||
| "claude-3-haiku-20240307" | ||
| "claude-3-opus" | ||
| "claude-3-opus-20240229" | ||
| "claude-3-sonnet" | ||
| "claude-3-sonnet-20240229" | ||
| "claude-3.5-sonnet" | ||
| "claude-3-5-sonnet-20240620" | ||
| "gpt4-turbo" | ||
| "gpt-4-turbo-2024-04-09" | ||
| "gpt-4o" | ||
| "gpt-4o-2024-05-13"; | ||
type: "IMAGE"; | ||
} | ||
/** | ||
* Extracts structured data from content items (text or images). | ||
@@ -385,9 +453,16 @@ * | ||
model: | ||
| "claude-3-haiku" | ||
| "claude-3-haiku-20240307" | ||
| "claude-3-opus" | ||
| "claude-3-opus-20240229" | ||
| "claude-3-sonnet" | ||
| "claude-3-sonnet-20240229" | ||
| "claude-3.5-sonnet" | ||
| "claude-3-haiku" | ||
| "claude-3-5-sonnet-20240620" | ||
| "gpt4-turbo" | ||
| "gpt-4-turbo-2024-04-09" | ||
| "gpt3.5-turbo" | ||
| "gpt-4o"; | ||
| "gpt-3.5-turbo-0125" | ||
| "gpt-4o" | ||
| "gpt-4o-2024-05-13"; | ||
} | ||
@@ -394,0 +469,0 @@ ): Promise<any>; |
@@ -220,2 +220,3 @@ import type { Page, Locator } from "@intuned/playwright-core"; | ||
* | ||
* @throws {Error} Throws an error if the endpoint option is provided in the uploadFileToS3 method options. | ||
* @returns {string} The URL descriptor of the file. | ||
@@ -226,2 +227,9 @@ */ | ||
/** | ||
* Gets file path in the s3 bucket | ||
* | ||
* @returns {string} The file path in the s3 bucket. | ||
*/ | ||
filePath(): string; | ||
/** | ||
* Generates a signed URL for the file. | ||
@@ -334,2 +342,3 @@ * | ||
suggestedFilename: () => string | undefined; | ||
mimeType: () => Promise<string | undefined>; | ||
} | ||
@@ -447,3 +456,7 @@ | ||
file: Download | string | Uint8Array | Buffer | ReadStream, | ||
options: { fileNameOverride?: string; s3Configs?: S3Configs } | ||
options?: { | ||
fileNameOverride?: string; | ||
s3Configs?: S3Configs; | ||
endpoint?: string; | ||
} | ||
): Promise<File>; |
{ | ||
"name": "@intuned/sdk-dev-types", | ||
"version": "1.0.5-rami-testing-response-view-6", | ||
"version": "1.0.6-beta.1-download-proxy-1", | ||
"description": "intuned runner types", | ||
@@ -5,0 +5,0 @@ "author": "Intuned Team", |
@@ -82,2 +82,5 @@ import { RunEnvironment } from "./enums"; | ||
runId?: string; | ||
jobId?: string; | ||
jobRunId?: string; | ||
queueId?: string; | ||
} | ||
@@ -84,0 +87,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68978
2088