mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
fix: TypeError: Cannot read properties of undefined (reading 'authType') (#3914)
This commit is contained in:
@@ -172,7 +172,7 @@ export class GeminiChat {
|
||||
this.config.getModel(),
|
||||
durationMs,
|
||||
prompt_id,
|
||||
this.config.getContentGeneratorConfig().authType!,
|
||||
this.config.getContentGeneratorConfig()?.authType,
|
||||
usageMetadata,
|
||||
responseText,
|
||||
),
|
||||
@@ -194,7 +194,7 @@ export class GeminiChat {
|
||||
errorMessage,
|
||||
durationMs,
|
||||
prompt_id,
|
||||
this.config.getContentGeneratorConfig().authType!,
|
||||
this.config.getContentGeneratorConfig()?.authType,
|
||||
errorType,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -96,13 +96,13 @@ export class UserPromptEvent {
|
||||
'event.timestamp': string; // ISO 8601
|
||||
prompt_length: number;
|
||||
prompt_id: string;
|
||||
auth_type: string;
|
||||
auth_type?: string;
|
||||
prompt?: string;
|
||||
|
||||
constructor(
|
||||
prompt_length: number,
|
||||
prompt_Id: string,
|
||||
auth_type: string,
|
||||
auth_type?: string,
|
||||
prompt?: string,
|
||||
) {
|
||||
this['event.name'] = 'user_prompt';
|
||||
@@ -167,14 +167,14 @@ export class ApiErrorEvent {
|
||||
status_code?: number | string;
|
||||
duration_ms: number;
|
||||
prompt_id: string;
|
||||
auth_type: string;
|
||||
auth_type?: string;
|
||||
|
||||
constructor(
|
||||
model: string,
|
||||
error: string,
|
||||
duration_ms: number,
|
||||
prompt_id: string,
|
||||
auth_type: string,
|
||||
auth_type?: string,
|
||||
error_type?: string,
|
||||
status_code?: number | string,
|
||||
) {
|
||||
@@ -205,13 +205,13 @@ export class ApiResponseEvent {
|
||||
total_token_count: number;
|
||||
response_text?: string;
|
||||
prompt_id: string;
|
||||
auth_type: string;
|
||||
auth_type?: string;
|
||||
|
||||
constructor(
|
||||
model: string,
|
||||
duration_ms: number,
|
||||
prompt_id: string,
|
||||
auth_type: string,
|
||||
auth_type?: string,
|
||||
usage_data?: GenerateContentResponseUsageMetadata,
|
||||
response_text?: string,
|
||||
error?: string,
|
||||
|
||||
Reference in New Issue
Block a user