kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
fix: import bug
rodzic
e2a5daca67
commit
82bf84e28e
|
@ -3,7 +3,7 @@ import 'dotenv/config'
|
||||||
|
|
||||||
import restoreCursor from 'restore-cursor'
|
import restoreCursor from 'restore-cursor'
|
||||||
|
|
||||||
import { WikipediaClient } from '../src'
|
import { SerperClient } from '../src'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scratch pad for testing.
|
* Scratch pad for testing.
|
||||||
|
@ -131,14 +131,14 @@ async function main() {
|
||||||
// json: true
|
// json: true
|
||||||
// })
|
// })
|
||||||
|
|
||||||
// const serper = new SerpAPIClient()
|
const serper = new SerperClient()
|
||||||
// const res = await serper.search({
|
const res = await serper.search({
|
||||||
// q: 'elon musk'
|
q: 'elon musk'
|
||||||
// })
|
|
||||||
const wikipedia = new WikipediaClient()
|
|
||||||
const res = await wikipedia.getPageSummary({
|
|
||||||
title: 'Elon_musk'
|
|
||||||
})
|
})
|
||||||
|
// const wikipedia = new WikipediaClient()
|
||||||
|
// const res = await wikipedia.getPageSummary({
|
||||||
|
// title: 'Elon_musk'
|
||||||
|
// })
|
||||||
|
|
||||||
console.log(JSON.stringify(res, null, 2))
|
console.log(JSON.stringify(res, null, 2))
|
||||||
}
|
}
|
||||||
|
|
10
package.json
10
package.json
|
@ -61,6 +61,16 @@
|
||||||
"types": "./dist/services/twitter/index.d.ts",
|
"types": "./dist/services/twitter/index.d.ts",
|
||||||
"import": "./dist/services/twitter/index.js",
|
"import": "./dist/services/twitter/index.js",
|
||||||
"default": "./dist/services/twitter/index.js"
|
"default": "./dist/services/twitter/index.js"
|
||||||
|
},
|
||||||
|
"./github": {
|
||||||
|
"types": "./dist/services/github-client.d.ts",
|
||||||
|
"import": "./dist/services/github-client.js",
|
||||||
|
"default": "./dist/services/github-client.js"
|
||||||
|
},
|
||||||
|
"./wikidata": {
|
||||||
|
"types": "./dist/services/wikidata-client.d.ts",
|
||||||
|
"import": "./dist/services/wikidata-client.js",
|
||||||
|
"default": "./dist/services/wikidata-client.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
|
|
@ -4,7 +4,6 @@ export * from './dexa-client'
|
||||||
export * from './diffbot-client'
|
export * from './diffbot-client'
|
||||||
export * from './exa-client'
|
export * from './exa-client'
|
||||||
export * from './firecrawl-client'
|
export * from './firecrawl-client'
|
||||||
export * from './github-client'
|
|
||||||
export * from './hacker-news-client'
|
export * from './hacker-news-client'
|
||||||
export * from './hunter-client'
|
export * from './hunter-client'
|
||||||
export * from './jina-client'
|
export * from './jina-client'
|
||||||
|
@ -24,6 +23,5 @@ export * from './social-data-client'
|
||||||
export * from './tavily-client'
|
export * from './tavily-client'
|
||||||
export * from './twilio-client'
|
export * from './twilio-client'
|
||||||
export * from './weather-client'
|
export * from './weather-client'
|
||||||
export * from './wikidata-client'
|
|
||||||
export * from './wikipedia-client'
|
export * from './wikipedia-client'
|
||||||
export * from './wolfram-alpha-client'
|
export * from './wolfram-alpha-client'
|
||||||
|
|
|
@ -10,6 +10,8 @@ export default defineConfig([
|
||||||
'src/sdks/langchain.ts',
|
'src/sdks/langchain.ts',
|
||||||
'src/sdks/llamaindex.ts',
|
'src/sdks/llamaindex.ts',
|
||||||
'src/services/twitter/index.ts',
|
'src/services/twitter/index.ts',
|
||||||
|
'src/services/github-client.ts',
|
||||||
|
'src/services/wikidata-client.ts',
|
||||||
'src/tools/calculator.ts',
|
'src/tools/calculator.ts',
|
||||||
'src/tools/e2b.ts'
|
'src/tools/e2b.ts'
|
||||||
],
|
],
|
||||||
|
|
Ładowanie…
Reference in New Issue