Skip to content

GooglePreparedRequest

Namespace: Vercel.AI.Google

public sealed class GooglePreparedRequest

A generateContent request body plus the warnings and extra headers that go with it.

Inheritance: object

View source

GooglePreparedRequest(JsonObject, IReadOnlyList<GoogleWarning>, IReadOnlyDictionary<string, string?>, GoogleToolPreparation, string?)

Section titled “GooglePreparedRequest(JsonObject, IReadOnlyList<GoogleWarning>, IReadOnlyDictionary<string, string?>, GoogleToolPreparation, string?)”
public GooglePreparedRequest(JsonObject body, IReadOnlyList<GoogleWarning> warnings, IReadOnlyDictionary<string, string?> extraHeaders, GoogleToolPreparation tools, string? jsonResponseToolName = null)

Creates a prepared request.

Parameters

Name Type Description
body JsonObject
warnings IReadOnlyList<GoogleWarning>
extraHeaders IReadOnlyDictionary<string, string>
tools GoogleToolPreparation
jsonResponseToolName string

View source

public JsonObject Body { get; }

Request JSON.

Value: JsonObject

View source

public IReadOnlyDictionary<string, string?> ExtraHeaders { get; }

Headers added for this call, such as Vertex pay-as-you-go request types.

Value: IReadOnlyDictionary<string, string>

View source

public string? JsonResponseToolName { get; }

Name of the internal tool that carries structured output, or null when the request uses native JSON formatting.

Value: string

View source

public GoogleToolPreparation Tools { get; }

Prepared tools, including built-in name mapping.

Value: GoogleToolPreparation

View source

public IReadOnlyList<GoogleWarning> Warnings { get; }

Preparation warnings.

Value: IReadOnlyList<GoogleWarning>

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product