mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-01 21:20:44 +00:00
refactor: remove unnecessary assertion (#2579)
This commit is contained in:
parent
65a58c3b03
commit
9ae2595bfd
6 changed files with 9 additions and 31 deletions
|
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import { GroundingMetadata } from '@google/genai';
|
||||
import { SchemaValidator } from '../utils/schemaValidator.js';
|
||||
import {
|
||||
BaseTool,
|
||||
|
|
@ -255,9 +254,7 @@ ${textContent}
|
|||
|
||||
let responseText = getResponseText(response) || '';
|
||||
const urlContextMeta = response.candidates?.[0]?.urlContextMetadata;
|
||||
const groundingMetadata = response.candidates?.[0]?.groundingMetadata as
|
||||
| GroundingMetadata
|
||||
| undefined;
|
||||
const groundingMetadata = response.candidates?.[0]?.groundingMetadata;
|
||||
const sources = groundingMetadata?.groundingChunks as
|
||||
| GroundingChunkItem[]
|
||||
| undefined;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue