Merge pull request #30 from davideuler/main
send 'markdown' format request to firecrawl to get complete markdown …
This commit is contained in:
@ -28,7 +28,12 @@ export const useWebSearch = (): WebSearchFunction => {
|
|||||||
apiUrl: webSearchApiBase,
|
apiUrl: webSearchApiBase,
|
||||||
})
|
})
|
||||||
return async (q: string, o: WebSearchOptions) => {
|
return async (q: string, o: WebSearchOptions) => {
|
||||||
const results = await fc.search(q, o)
|
const results = await fc.search(q, {
|
||||||
|
...o,
|
||||||
|
scrapeOptions: {
|
||||||
|
formats: ['markdown']
|
||||||
|
}
|
||||||
|
})
|
||||||
if (results.error) {
|
if (results.error) {
|
||||||
throw new Error(results.error)
|
throw new Error(results.error)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user