io.cequence.openaiscala.gemini.domain.response

Members list

Concise view

Type members

Classlikes

sealed trait AttributionSourceId

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait AttributionSourceIdPrefix extends EnumValue

Attributes

Companion:
object
Graph
Supertypes
trait EnumValue
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait BlockReason extends EnumValue

Attributes

Companion:
object
Graph
Supertypes
trait EnumValue
class Object
trait Matchable
class Any
Known subtypes
object BLOCKLIST.type
object IMAGE_SAFETY.type
object OTHER.type
object PROHIBITED_CONTENT.type
object SAFETY.type

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
case class Candidate(content: Content, finishReason: Option[FinishReason], safetyRatings: Seq[SafetyRating], citationMetadata: Option[CitationMetadata], tokenCount: Option[Int], groundingAttributions: Seq[GroundingAttribution], groundingMetadata: Option[GroundingMetadata], avgLogprobs: Option[Double], logprobsResult: Option[LogprobsResult], index: Option[Int])

Attributes

avgLogprobs

Output only. Average log probability score of the candidate.

citationMetadata

Output only. Citation information for model-generated candidate. This field may be populated with recitation information for any text included in the content. These are passages that are "recited" from copyrighted material in the foundational LLM's training data.

content

Output only. Generated content returned from the model.

finishReason

Optional. Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating tokens.

groundingAttributions

Output only. Attribution information for sources that contributed to a grounded answer. This field is populated for GenerateAnswer calls.

groundingMetadata

Output only. Grounding metadata for the candidate. This field is populated for GenerateContent calls.

index

Output only. Index of the candidate in the list of response candidates.

logprobsResult

Output only. Log-likelihood scores for the response tokens and top tokens.

safetyRatings

List of ratings for the safety of a response candidate. There is at most one rating per category.

tokenCount

Output only. Token count for this candidate.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class CitationMetadata(citationSources: Seq[CitationSource])

A collection of source attributions for a piece of content.

A collection of source attributions for a piece of content.

Attributes

citationSources

Citations to sources for a specific response.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class CitationSource(startIndex: Option[Int], endIndex: Option[Int], uri: Option[String], license: Option[String])

A citation to a source for a portion of a specific response.

A citation to a source for a portion of a specific response.

Attributes

endIndex

Optional. End of the attributed segment, exclusive.

license

Optional. License for the GitHub project that is attributed as a source for segment. License info is required for code citations.

startIndex

Optional. Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

uri

Optional. URI that is attributed as a source for a portion of the text.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
sealed trait FinishReason extends EnumValue

Attributes

Companion:
object
Graph
Supertypes
trait EnumValue
class Object
trait Matchable
class Any
Known subtypes
object BLOCKLIST.type
object IMAGE_SAFETY.type
object LANGUAGE.type
object MAX_TOKENS.type
object OTHER.type
object PROHIBITED_CONTENT.type
object RECITATION.type
object SAFETY.type
object SPII.type
object STOP.type

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
case class GenerateContentResponse(candidates: Seq[Candidate], promptFeedback: Option[PromptFeedback], usageMetadata: UsageMetadata, modelVersion: String, cachedContent: Option[String])

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class GroundingAttribution(sourceId: AttributionSourceId, content: Content)

Attribution for a source that contributed to an answer.

Attribution for a source that contributed to an answer.

Attributes

content

Grounding source content that makes up this attribution.

sourceId

Output only. Identifier for the source contributing to this attribution.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class GroundingChunk(web: Web)

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class GroundingMetadata(groundingChunks: Seq[GroundingChunk], groundingSupports: Seq[GroundingSupport], webSearchQueries: Seq[String], searchEntryPoint: Option[SearchEntryPoint], retrievalMetadata: Option[RetrievalMetadata])

Metadata returned to client when grounding is enabled.

Metadata returned to client when grounding is enabled.

Attributes

groundingChunks

List of supporting references retrieved from specified grounding source.

groundingSupports

List of grounding support.

retrievalMetadata

Metadata related to retrieval in the grounding flow.

searchEntryPoint

Optional. Google search entry for the following-up web searches.

webSearchQueries

Web search queries for the following-up web search.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class GroundingSupport(groundingChunkIndices: Seq[Int], confidenceScores: Seq[Double], segment: Segment)

Grounding support.

Grounding support.

Attributes

confidenceScores

Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the groundingChunkIndices.

groundingChunkIndices

A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim.

segment

Segment of the content this support belongs to.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class ListCachedContentsResponse(cachedContents: Seq[CachedContent], nextPageToken: Option[String])

Response from ListCachedContents containing a paginated list.

Response from ListCachedContents containing a paginated list.

Attributes

cachedContents

list of cached contents.

nextPageToken

A token, which can be sent as pageToken to retrieve the next page. If this field is omitted, there are no more pages.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class ListModelsResponse(models: Seq[Model], nextPageToken: Option[String])

Response from ListModel containing a paginated list of Models.

Response from ListModel containing a paginated list of Models.

Attributes

models

the returned Models

nextPageToken

A token, which can be sent as pageToken to retrieve the next page. If this field is omitted, there are no more pages.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class LogprobsResult(topCandidates: Seq[TopCandidates], chosenCandidates: Seq[Candidate])

Logprobs Result

Logprobs Result

Attributes

chosenCandidates

Length = total number of decoding steps. The chosen candidates may or may not be in topCandidates.

topCandidates

Length = total number of decoding steps.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class ModalityTokenCount(modality: Modality, tokenCount: Int)

Represents token counting info for a single modality.

Represents token counting info for a single modality.

Attributes

modality

The modality associated with this token count.

tokenCount

Number of tokens.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class PromptFeedback(blockReason: Option[BlockReason], safetyRatings: Seq[SafetyRating])

A set of the feedback metadata the prompt specified in GenerateContentRequest.content.

A set of the feedback metadata the prompt specified in GenerateContentRequest.content.

Attributes

blockReason

Optional. If set, the prompt was blocked and no candidates are returned. Rephrase the prompt.

safetyRatings

Ratings for safety of the prompt. There is at most one rating per category.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class RetrievalMetadata(googleSearchDynamicRetrievalScore: Option[Double])

Metadata related to retrieval in the grounding flow.

Metadata related to retrieval in the grounding flow.

Attributes

googleSearchDynamicRetrievalScore

Optional. Score indicating how likely information from google search could help answer the prompt. The score is in the range [0, 1], where 0 is the least likely and 1 is the most likely. This score is only populated when google search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger google search.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class SafetyRating(category: HarmCategory, probability: HarmProbability, blocked: Option[Boolean])

Safety rating for a piece of content. The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm classification is included here.

Safety rating for a piece of content. The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm classification is included here.

Attributes

blocked

Was this content blocked because of this rating?

category

The category for this rating.

probability

The probability of harm for this content.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class SearchEntryPoint(renderedContent: Option[String], sdkBlob: Option[String])

Google search entry point.

Google search entry point.

Attributes

renderedContent

Optional. Web content snippet that can be embedded in a web page or an app webview.

sdkBlob

Optional. Base64 encoded JSON representing array of <search term, search url> tuple. A base64-encoded string.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class Segment(partIndex: Int, startIndex: Int, endIndex: Int, text: String)

Segment of the content.

Segment of the content.

Attributes

endIndex

Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero.

partIndex

Output only. The index of a Part object within its parent Content object.

startIndex

Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero.

text

Output only. The text corresponding to the segment from the response.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class TopCandidates(candidates: Seq[Candidate])

Candidates with top log probabilities at each decoding step.

Candidates with top log probabilities at each decoding step.

Attributes

candidates

Sorted by log probability in descending order.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class UsageMetadata(promptTokenCount: Int, cachedContentTokenCount: Option[Int], candidatesTokenCount: Option[Int], totalTokenCount: Int, promptTokensDetails: Seq[ModalityTokenCount], cacheTokensDetails: Seq[ModalityTokenCount], candidatesTokensDetails: Seq[ModalityTokenCount])

Metadata on the generation request's token usage.

Metadata on the generation request's token usage.

Attributes

cacheTokensDetails

Output only. List of modalities of the cached content in the request input.

cachedContentTokenCount

Number of tokens in the cached part of the prompt (the cached content).

candidatesTokenCount

Total number of tokens across all the generated response candidates.

candidatesTokensDetails

Output only. List of modalities that were returned in the response.

promptTokenCount

Number of tokens in the prompt. When cachedContent is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.

promptTokensDetails

Output only. List of modalities that were processed in the request input.

totalTokenCount

Total token count for the generation request (prompt + response candidates).

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class Web(uri: String, title: String)

Chunk from the web.

Chunk from the web.

Attributes

title

Title of the chunk.

uri

URI reference of the chunk.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any