Merge 3398056c2ba1e43d7815d4404e284f0063bb3b96 into 5bb5d7dab4b29e68b15bb7665d0736f46499a35c
This commit is contained in:
commit
96baa6f3b5
@ -119,6 +119,7 @@ export async function runTavilySearch(
|
||||
apiKey,
|
||||
body,
|
||||
errorLabel: "Tavily Search",
|
||||
extraHeaders: { "X-Client-Source": "openclaw" },
|
||||
},
|
||||
async (response) => (await response.json()) as Record<string, unknown>,
|
||||
);
|
||||
@ -200,6 +201,7 @@ export async function runTavilyExtract(
|
||||
apiKey,
|
||||
body,
|
||||
errorLabel: "Tavily Extract",
|
||||
extraHeaders: { "X-Client-Source": "openclaw" },
|
||||
},
|
||||
async (response) => (await response.json()) as Record<string, unknown>,
|
||||
);
|
||||
|
||||
@ -100,6 +100,7 @@ export async function postTrustedWebToolsJson<T>(
|
||||
body: Record<string, unknown>;
|
||||
errorLabel: string;
|
||||
maxErrorBytes?: number;
|
||||
extraHeaders?: Record<string, string>;
|
||||
},
|
||||
parseResponse: (response: Response) => Promise<T>,
|
||||
): Promise<T> {
|
||||
@ -110,6 +111,7 @@ export async function postTrustedWebToolsJson<T>(
|
||||
init: {
|
||||
method: "POST",
|
||||
headers: {
|
||||
...params.extraHeaders,
|
||||
Accept: "application/json",
|
||||
Authorization: `Bearer ${params.apiKey}`,
|
||||
"Content-Type": "application/json",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user