Back to Firebase Js Sdk

RequestOptions interface

docs-devsite/ai.requestoptions.md

12.12.12.4 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 %}

RequestOptions interface

Params passed to getGenerativeModel()<!-- -->.

<b>Signature:</b>

typescript
export interface RequestOptions 

Properties

PropertyTypeDescription
baseUrlstringBase url for endpoint. Defaults to https://firebasevertexai.googleapis.com, which is the Firebase AI Logic API (used regardless of your chosen Gemini API provider).
maxSequentialFunctionCallsnumberLimits amount of sequential function calls the SDK can make during automatic function calling, in order to prevent infinite loops. If not specified, this value defaults to 10.<!-- -->When it reaches this limit, it will return the last response received from the model, whether it is a text response or further function calls.
timeoutnumberRequest timeout in milliseconds. Defaults to 180 seconds (180000ms).

RequestOptions.baseUrl

Base url for endpoint. Defaults to https://firebasevertexai.googleapis.com, which is the Firebase AI Logic API (used regardless of your chosen Gemini API provider).

<b>Signature:</b>

typescript
baseUrl?: string;

RequestOptions.maxSequentialFunctionCalls

Limits amount of sequential function calls the SDK can make during automatic function calling, in order to prevent infinite loops. If not specified, this value defaults to 10.

When it reaches this limit, it will return the last response received from the model, whether it is a text response or further function calls.

<b>Signature:</b>

typescript
maxSequentialFunctionCalls?: number;

RequestOptions.timeout

Request timeout in milliseconds. Defaults to 180 seconds (180000ms).

<b>Signature:</b>

typescript
timeout?: number;