Add "Cache-Control: no-cache" header to brave api web search requests.
This commit is contained in:
parent
3f83afe4a6
commit
0dc7b8bfc0
@ -67,8 +67,8 @@ const WebSearchSchema = Type.Object({
|
|||||||
|
|
||||||
type WebSearchConfig = NonNullable<MoltbotConfig["tools"]>["web"] extends infer Web
|
type WebSearchConfig = NonNullable<MoltbotConfig["tools"]>["web"] extends infer Web
|
||||||
? Web extends { search?: infer Search }
|
? Web extends { search?: infer Search }
|
||||||
? Search
|
? Search
|
||||||
: undefined
|
: undefined
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
type BraveSearchResult = {
|
type BraveSearchResult = {
|
||||||
@ -375,6 +375,7 @@ async function runWebSearch(params: {
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
|
"Cache-Control": "no-cache",
|
||||||
"X-Subscription-Token": params.apiKey,
|
"X-Subscription-Token": params.apiKey,
|
||||||
},
|
},
|
||||||
signal: withTimeout(undefined, params.timeoutSeconds * 1000),
|
signal: withTimeout(undefined, params.timeoutSeconds * 1000),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user