GoogleResponse
Namespace: Vercel.AI.Google
public static class GoogleResponseParses a Gemini generateContent response.
Inheritance: object
Methods
Section titled “Methods”Parse(JsonElement, GoogleParseContext)
Section titled “Parse(JsonElement, GoogleParseContext)”public static LanguageModelGenerateResult Parse(JsonElement root, GoogleParseContext context)Parses one generateContent JSON document.
Parameters
| Name | Type | Description |
|---|---|---|
root |
JsonElement | |
context |
GoogleParseContext |
Returns: LanguageModelGenerateResult
Sources(JsonElement, GoogleParseContext)
Section titled “Sources(JsonElement, GoogleParseContext)”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>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product