@intuned/runner-types
Advanced tools
Comparing version 0.18.1-fadi-12 to 0.18.1-fadi-13
@@ -74,3 +74,3 @@ declare module '@intuned/runner' { | ||
}; | ||
export type ExtractionSupportedModels = "gpt4" | "gpt4-turbo" | "gpt3.5-turbo"; | ||
export type OpenAiModels = "gpt4" | "gpt4-turbo" | "gpt3.5-turbo"; | ||
export interface InputFieldsInfo { | ||
@@ -137,2 +137,19 @@ fieldType: "select" | "text-input" | "checkbox" | "radiogroup" | "submit-button"; | ||
} | ||
const strategySchema: z.ZodDefault<z.ZodOptional<z.ZodObject<{ | ||
model: z.ZodEnum<[ | ||
"claude-3-opus", | ||
"claude-3-sonnet", | ||
"claude-3-haiku", | ||
"gpt4-turbo", | ||
"gpt3.5-turbo" | ||
]>; | ||
type: z.ZodLiteral<"HTML">; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "HTML"; | ||
model: "gpt4-turbo" | "gpt3.5-turbo" | "claude-3-opus" | "claude-3-sonnet" | "claude-3-haiku"; | ||
}, { | ||
type: "HTML"; | ||
model: "gpt4-turbo" | "gpt3.5-turbo" | "claude-3-opus" | "claude-3-sonnet" | "claude-3-haiku"; | ||
}>>>; | ||
export type ExtractionStrategy = z.infer<typeof strategySchema>; | ||
export type ExtractionResultObject = Record<string, string | null> | null; | ||
@@ -152,2 +169,3 @@ export type InvalidatorFunction = (result: ExtractionResultObject) => string[]; | ||
variantKey?: string; | ||
strategy?: ExtractionStrategy; | ||
} | ||
@@ -229,4 +247,24 @@ export interface ExecutionInfo { | ||
], z.ZodUnknown>, z.ZodUnknown>>; | ||
strategy: z.ZodDefault<z.ZodOptional<z.ZodObject<{ | ||
model: z.ZodEnum<[ | ||
"claude-3-opus", | ||
"claude-3-sonnet", | ||
"claude-3-haiku", | ||
"gpt4-turbo", | ||
"gpt3.5-turbo" | ||
]>; | ||
type: z.ZodLiteral<"HTML">; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "HTML"; | ||
model: "gpt4-turbo" | "gpt3.5-turbo" | "claude-3-opus" | "claude-3-sonnet" | "claude-3-haiku"; | ||
}, { | ||
type: "HTML"; | ||
model: "gpt4-turbo" | "gpt3.5-turbo" | "claude-3-opus" | "claude-3-sonnet" | "claude-3-haiku"; | ||
}>>>; | ||
}, "strip", z.ZodTypeAny, { | ||
listEntityName: string; | ||
strategy: { | ||
type: "HTML"; | ||
model: "gpt4-turbo" | "gpt3.5-turbo" | "claude-3-opus" | "claude-3-sonnet" | "claude-3-haiku"; | ||
}; | ||
listEntityDescription?: string | undefined; | ||
@@ -240,2 +278,6 @@ variantKey?: string | undefined; | ||
optionalPropertiesInvalidator?: ((...args: unknown[]) => unknown) | undefined; | ||
strategy?: { | ||
type: "HTML"; | ||
model: "gpt4-turbo" | "gpt3.5-turbo" | "claude-3-opus" | "claude-3-sonnet" | "claude-3-haiku"; | ||
} | undefined; | ||
}>; | ||
@@ -273,3 +315,3 @@ export interface DynamicListExtractorOptions extends Omit<z.infer<typeof dynamicListExtractorOptionsSchema>, "container" | "optionalPropertiesInvalidator"> { | ||
getRelativeElementReliableSelectors(anchorElement: Locator, relativeSelector: string): Promise<string[]>; | ||
extractDataUsingAiFromPage<T = any>(entityName: string, jsonSchema: JSONSchema, searchRegion?: AbsoluteElementSelector | Locator, model?: ExtractionSupportedModels): Promise<T>; | ||
extractDataUsingAiFromPage<T = any>(entityName: string, jsonSchema: JSONSchema, searchRegion?: AbsoluteElementSelector | Locator, model?: OpenAiModels): Promise<T>; | ||
classifyUsingAi(categories: ClassificationCategories): Promise<{ | ||
@@ -282,3 +324,3 @@ status: "failed" | "success"; | ||
dynamicListExtractor(identifier: string, options: DynamicListExtractorOptions): Promise<ExtractionResultList | undefined>; | ||
extractDataUsingAiFromText<T = any>(entityName: string, jsonSchema: JSONSchema, text: string, model?: ExtractionSupportedModels): Promise<T>; | ||
extractDataUsingAiFromText<T = any>(entityName: string, jsonSchema: JSONSchema, text: string, model?: OpenAiModels): Promise<T>; | ||
extractObjectDynamicExtractor<T extends ObjectJSONSchema>(entityName: string, jsonSchema: T, searchRegion?: AbsoluteElementSelector | Locator, InvalidatePropertyIfEmpty?: boolean): Promise<ExtractObjectDynamicExtractorReturnType<T>>; | ||
@@ -285,0 +327,0 @@ private findXpathForLocator; |
{ | ||
"name": "@intuned/runner-types", | ||
"version": "0.18.1-fadi-12", | ||
"version": "0.18.1-fadi-13", | ||
"description": "intuned runner types", | ||
@@ -5,0 +5,0 @@ "author": "Intuned Team", |
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
24153
766