Skip to content

Commit c8da45d

Browse files
committed
refactor: use the shared Tavily response reader directly
1 parent 00d542d commit c8da45d

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

‎extensions/tavily/src/tavily-client.ts‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,20 +122,12 @@ async function postTavilyJson(params: {
122122
...(params.signal ? { signal: params.signal } : {}),
123123
},
124124
async (response) =>
125-
readTavilyJsonResponse(response, params.errorLabel, {
125+
readProviderJsonResponse<Record<string, unknown>>(response, params.errorLabel, {
126126
maxBytes: params.responseMaxBytes,
127127
}),
128128
);
129129
}
130130

131-
async function readTavilyJsonResponse(
132-
response: Response,
133-
label: string,
134-
opts?: { maxBytes?: number },
135-
): Promise<Record<string, unknown>> {
136-
return await readProviderJsonResponse<Record<string, unknown>>(response, label, opts);
137-
}
138-
139131
export async function runTavilySearch(
140132
params: TavilySearchParams,
141133
): Promise<Record<string, unknown>> {
@@ -415,6 +407,5 @@ export async function runTavilyExtract(
415407
}
416408

417409
export const testing = {
418-
readTavilyJsonResponse,
419410
resolveEndpoint,
420411
};

0 commit comments

Comments
 (0)