Skip to content

GoogleResponse

Namespace: Vercel.AI.Google

public static class GoogleResponse

Parses a Gemini generateContent response.

Inheritance: object

View source

public static LanguageModelGenerateResult Parse(JsonElement root, GoogleParseContext context)

Parses one generateContent JSON document.

Parameters

Name Type Description
root JsonElement
context GoogleParseContext

Returns: LanguageModelGenerateResult

View source

public static IReadOnlyList<GeneratedSource> Sources(JsonElement grounding, GoogleParseContext context)

Reads URL and document sources from grounding metadata.

Parameters

Name Type Description
grounding JsonElement
context GoogleParseContext

Returns: IReadOnlyList<GeneratedSource>

View source

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