kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
fix: firecrawl updates from last pr
rodzic
5efa64bb4f
commit
0ec220446d
|
@ -11,15 +11,23 @@
|
|||
"type": "git",
|
||||
"url": "git+https://github.com/transitive-bullshit/agentic.git"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"type": "module",
|
||||
"source": "./src/index.ts",
|
||||
"types": "./dist/index.d.ts",
|
||||
"sideEffects": false,
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist/**"
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsup",
|
||||
"build": "tsup --config ../../tsup.config.ts",
|
||||
"dev": "tsup --config ../../tsup.config.ts --watch",
|
||||
"clean": "del dist",
|
||||
"test": "run-s test:*",
|
||||
"test:lint": "eslint .",
|
||||
|
@ -34,10 +42,7 @@
|
|||
"zod": "catalog:"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@agentic/tsconfig": "workspace:*",
|
||||
"@types/node": "^20.11.16",
|
||||
"tsup": "^8.0.1",
|
||||
"typescript": "^5.3.3"
|
||||
"@agentic/tsconfig": "workspace:*"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { z } from 'zod'
|
||||
|
||||
import { FirecrawlClient } from './dist/index.mjs'
|
||||
import { FirecrawlClient } from './firecrawl-client'
|
||||
|
||||
// Initialize the client with the API key
|
||||
const apiKey = 'FIRECRAWL-API-KEY'
|
||||
|
@ -26,7 +26,8 @@ async function testUrlScraping() {
|
|||
async function testSearch() {
|
||||
console.log('\n🔍 Testing search...')
|
||||
try {
|
||||
const result = await firecrawl.search('artificial intelligence news', {
|
||||
const result = await firecrawl.search({
|
||||
query: 'artificial intelligence news',
|
||||
limit: 5,
|
||||
lang: 'en',
|
||||
country: 'us'
|
||||
|
@ -45,7 +46,8 @@ async function testSearch() {
|
|||
async function testCrawlUrl() {
|
||||
console.log('\n🔍 Testing URL crawling...')
|
||||
try {
|
||||
const result = await firecrawl.crawlUrl('https://example.com', {
|
||||
const result = await firecrawl.crawlUrl({
|
||||
url: 'https://example.com',
|
||||
maxDepth: 2,
|
||||
limit: 5
|
||||
})
|
Plik diff jest za duży
Load Diff
|
@ -1,13 +1 @@
|
|||
export type {
|
||||
ErrorResponse,
|
||||
ExtractParams,
|
||||
ExtractResponse,
|
||||
ExtractStatusResponse,
|
||||
FirecrawlClientConfig,
|
||||
GenerateLLMsTextParams,
|
||||
GenerateLLMsTextResponse,
|
||||
GenerateLLMsTextStatusResponse,
|
||||
ScrapeParams,
|
||||
ScrapeResponse
|
||||
} from './firecrawl-client.js'
|
||||
export { FirecrawlClient } from './firecrawl-client.js'
|
||||
export * from './firecrawl-client'
|
||||
|
|
Ładowanie…
Reference in New Issue