Function: runWebSearch()
runWebSearch(
request,config,ctx,signal?):Promise<{answer:string;citations:object[];model:string;query:string; }>
Run a web search. Prefers the Databricks native web-search tool on a deployed GPT/Gemini endpoint (synthesized answer + citations); when the workspace has no such endpoint AND the scrape fallback is enabled, falls back to a DuckDuckGo scrape so the tool still returns results instead of erroring. Citations are filtered through the configured URL allow-list.
signal cancels the whole call, including the in-flight serving request.
Parameters
Section titled “Parameters”request
Section titled “request”model?
Section titled “model?”string = ...
string = ...
config
Section titled “config”signal?
Section titled “signal?”AbortSignal
Returns
Section titled “Returns”Promise<{ answer: string; citations: object[]; model: string; query: string; }>