16 lines
326 B
TypeScript
16 lines
326 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2025 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import { Content } from '@google/genai';
|
|
|
|
export function isFunctionResponse(content: Content): boolean {
|
|
return (
|
|
content.role === 'user' &&
|
|
!!content.parts &&
|
|
content.parts.every((part) => !!part.functionResponse)
|
|
);
|
|
}
|