gproxy-protocol 4.1.11

GPROXY v4 connection modelling, operation declarations, vendor wire types and pairwise conversion
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Gemini `models.streamGenerateContent` wire shapes.
//!
//! The endpoint takes the same request as `generateContent` and returns a
//! stream of `GenerateContentResponse` JSON records.  A transport chunk is
//! not a JSON record. SSE (`alt=sse`) or JSON-array framing belongs to the
//! transport; these aliases do not implement parsing or codecs.
//! The generated google-cloud-python REST method uses ResponseIterator with
//! `_rest_streaming_base`, whose JSON-array iterator expects an opening `[`.
//! Source: `upstream_docs/gemini/docs/Generating content.md`,
//! `models.streamGenerateContent` (endpoint, request, and response body).
use super::{GenerateContentRequest, GenerateContentResponseBody};
use crate::{WireResponse, connection::ByteStream};

/// Every streamed record has exactly the non-streaming response shape.
pub type StreamChunk = GenerateContentResponseBody;
pub type StreamRequest = GenerateContentRequest;
pub type StreamResponse = WireResponse<ByteStream>;