EnhancedGenerateContentResponse interface

使用辅助方法封装的响应对象。

签名

export interface EnhancedGenerateContentResponse extends GenerateContentResponse 

扩展GenerateContentResponse

属性

属性 类型 说明
functionCalls () =>FunctionCall[] |未定义
文本 () =>字符串 从响应中返回文本字符串(如果有)。如果提示或候选字词被屏蔽,则抛出此异常。

EnhancedGenerateContentResponse.functionCalls

签名

functionCalls: () => FunctionCall[] | undefined;

EnhancedGenerateContentResponse.text

从响应中返回文本字符串(如果有)。如果提示或候选字词被屏蔽,则抛出此异常。

签名

text: () => string;