fix(js-sdk): default type for LLM extract

This commit is contained in:
Gergő Móricz 2024-09-17 20:49:01 +02:00
parent 43d8563bb1
commit b2b7f8d874
3 changed files with 6 additions and 5 deletions

View File

@ -1,12 +1,12 @@
{
"name": "@mendable/firecrawl-js",
"version": "1.4.3",
"version": "1.4.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@mendable/firecrawl-js",
"version": "1.4.3",
"version": "1.4.4",
"license": "MIT",
"dependencies": {
"axios": "^1.6.8",

View File

@ -58,7 +58,7 @@ export interface FirecrawlDocumentMetadata {
* Document interface for Firecrawl.
* Represents a document retrieved or processed by Firecrawl.
*/
export interface FirecrawlDocument<T> {
export interface FirecrawlDocument<T = any> {
url?: string;
markdown?: string;
html?: string;
@ -83,7 +83,7 @@ export interface CrawlScrapeOptions {
timeout?: number;
}
export interface ScrapeParams<LLMSchema extends zt.ZodSchema> extends CrawlScrapeOptions {
export interface ScrapeParams<LLMSchema extends zt.ZodSchema = any> extends CrawlScrapeOptions {
extract?: {
prompt?: string;
schema?: LLMSchema;
@ -95,7 +95,7 @@ export interface ScrapeParams<LLMSchema extends zt.ZodSchema> extends CrawlScrap
* Response interface for scraping operations.
* Defines the structure of the response received after a scraping operation.
*/
export interface ScrapeResponse<LLMResult> extends FirecrawlDocument<LLMResult> {
export interface ScrapeResponse<LLMResult = any> extends FirecrawlDocument<LLMResult> {
success: true;
warning?: string;
error?: string;

View File

@ -9,6 +9,7 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"@mendable/firecrawl-js": "^1.0.3",
"axios": "^1.6.8",
"firecrawl": "^1.2.0",
"ts-node": "^10.9.2",