Back to Firebase Js Sdk

FunctionResponse interface

docs-devsite/ai.functionresponse.md

12.12.12.0 KB
Original Source

Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference

{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}

FunctionResponse interface

The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a FunctionCall made based on model prediction.

<b>Signature:</b>

typescript
export interface FunctionResponse 

Properties

PropertyTypeDescription
idstringThe id of the FunctionCall<!-- -->.
namestring
partsPart<!-- -->[]
responseobject

FunctionResponse.id

The id of the FunctionCall<!-- -->.

This property is only supported in the Gemini Developer API (GoogleAIBackend<!-- -->). When using the Gemini Developer API (GoogleAIBackend<!-- -->), this property will be undefined<!-- -->.

<b>Signature:</b>

typescript
id?: string;

FunctionResponse.name

<b>Signature:</b>

typescript
name: string;

FunctionResponse.parts

<b>Signature:</b>

typescript
parts?: Part[];

FunctionResponse.response

<b>Signature:</b>

typescript
response: object;