Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions api-reference/server/services/llm/google-vertex.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@ Before using Google Vertex AI LLM services, you need:
HTTP options for the Google AI client.
</ParamField>

<ParamField path="stream_idle_timeout_secs" type="float | None" default="20.0">
How long to wait for the next chunk of a streamed response before giving up on
it. Bounds the wait when the API accepts a request and then stops producing
without closing the stream. This is a gap between chunks, not a limit on how
long a response may take overall. The first chunk is the slowest, since its
wait spans the whole round trip including any thinking the model does before
it emits anything; raise this for models configured to think at length. Set to
`None` to wait indefinitely. Inherited from `GoogleLLMService`.
</ParamField>

## Usage

### Basic Setup
Expand Down
18 changes: 14 additions & 4 deletions api-reference/server/services/llm/google.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ Before using Google Gemini LLM services, you need:
HTTP options for the Google API client.
</ParamField>

<ParamField path="stream_idle_timeout_secs" type="float | None" default="20.0">
How long to wait for the next chunk of a streamed response before giving up on
it. Bounds the wait when the API accepts a request and then stops producing
without closing the stream. This is a gap between chunks, not a limit on how
long a response may take overall. The first chunk is the slowest, since its
wait spans the whole round trip including any thinking the model does before
it emits anything; raise this for models configured to think at length. Set to
`None` to wait indefinitely.
</ParamField>

### Settings

Runtime-configurable settings passed via the `settings` constructor argument using `GoogleLLMService.Settings(...)`. These can be updated mid-conversation with `LLMUpdateSettingsFrame`. See [Service Settings](/pipecat/fundamentals/service-settings) for details.
Expand Down Expand Up @@ -272,10 +282,10 @@ await worker.queue_frame(

`GoogleLLMService` supports the following event handlers, inherited from [LLMService](/api-reference/server/events/service-events):

| Event | Description |
| --------------------------- | --------------------------------------------------------------------------- |
| `on_completion_timeout` | Called when an LLM completion request times out (Google `DeadlineExceeded`) |
| `on_function_calls_started` | Called when function calls are received and execution is about to start |
| Event | Description |
| --------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `on_completion_timeout` | Called when an LLM completion request times out (Google `DeadlineExceeded` or stream idle timeout reached) |
| `on_function_calls_started` | Called when function calls are received and execution is about to start |

```python
@llm.event_handler("on_completion_timeout")
Expand Down
Loading