mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 23:59:45 +00:00
fix: satisfy google transport fetch boundary
This commit is contained in:
parent
26f1f28ffe
commit
1af8bd90c3
1 changed files with 2 additions and 2 deletions
|
|
@ -618,13 +618,13 @@ export function createGoogleGenerativeAiTransportStreamFn(): StreamFn {
|
|||
};
|
||||
try {
|
||||
const apiKey = options?.apiKey ?? getEnvApiKey(model.provider) ?? undefined;
|
||||
const fetch = buildGuardedModelFetch(model);
|
||||
const guardedFetch = buildGuardedModelFetch(model);
|
||||
let params = buildGoogleGenerativeAiParams(model, context, options);
|
||||
const nextParams = await options?.onPayload?.(params, model);
|
||||
if (nextParams !== undefined) {
|
||||
params = nextParams as GoogleGenerateContentRequest;
|
||||
}
|
||||
const response = await fetch(buildGoogleRequestUrl(model), {
|
||||
const response = await guardedFetch(buildGoogleRequestUrl(model), {
|
||||
method: "POST",
|
||||
headers: buildGoogleHeaders(model, apiKey, options?.headers),
|
||||
body: JSON.stringify(params),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue