mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-26 13:04:49 -07:00
Co-authored-by: Yuna Seol <yunaseol@google.com>
This commit is contained in:
@@ -53,6 +53,7 @@ import {
|
||||
recordConversationOffered,
|
||||
} from './telemetry.js';
|
||||
import { getClientMetadata } from './experiments/client_metadata.js';
|
||||
import type { LlmRole } from '../telemetry/types.js';
|
||||
/** HTTP options to be used in each of the requests. */
|
||||
export interface HttpOptions {
|
||||
/** Additional HTTP headers to be sent with the request. */
|
||||
@@ -75,6 +76,8 @@ export class CodeAssistServer implements ContentGenerator {
|
||||
async generateContentStream(
|
||||
req: GenerateContentParameters,
|
||||
userPromptId: string,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
role: LlmRole,
|
||||
): Promise<AsyncGenerator<GenerateContentResponse>> {
|
||||
const responses =
|
||||
await this.requestStreamingPost<CaGenerateContentResponse>(
|
||||
@@ -125,6 +128,8 @@ export class CodeAssistServer implements ContentGenerator {
|
||||
async generateContent(
|
||||
req: GenerateContentParameters,
|
||||
userPromptId: string,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
role: LlmRole,
|
||||
): Promise<GenerateContentResponse> {
|
||||
const start = Date.now();
|
||||
const response = await this.requestPost<CaGenerateContentResponse>(
|
||||
|
||||
Reference in New Issue
Block a user