Fix build. Revert work-around.

This commit is contained in:
Christian Gunderman
2026-02-09 16:49:36 -08:00
parent 1e589f0692
commit b5a5694922
2 changed files with 4 additions and 8 deletions

View File

@@ -137,18 +137,14 @@ export function toGenerateContentRequest(
export function fromGenerateContentResponse(
res: CaGenerateContentResponse,
): GenerateContentResponse {
const out = new GenerateContentResponse();
out.responseId = res.traceId;
const inres = res.response;
if (!inres) {
out.candidates = [];
return out;
}
out.candidates = inres.candidates ?? [];
const out = new GenerateContentResponse();
out.candidates = inres.candidates;
out.automaticFunctionCallingHistory = inres.automaticFunctionCallingHistory;
out.promptFeedback = inres.promptFeedback;
out.usageMetadata = inres.usageMetadata;
out.modelVersion = inres.modelVersion;
out.responseId = res.traceId;
return out;
}

View File

@@ -65,7 +65,7 @@ import {
recordConversationOffered,
} from './telemetry.js';
import { getClientMetadata } from './experiments/client_metadata.js';
import { debugLogger } from 'src/utils/debugLogger.js';
import { debugLogger } from '../utils/debugLogger.js';
/** HTTP options to be used in each of the requests. */
export interface HttpOptions {
/** Additional HTTP headers to be sent with the request. */