io.cequence.openaiscala.gemini.domain

Members list

Concise view

Type members

Classlikes

case class CachedContent(contents: Seq[Content], tools: Seq[Tool], expireTime: Expiration, name: Option[String], displayName: Option[String], model: String, systemInstruction: Option[Content], toolConfig: Option[ToolConfig])

The request body contains an instance of CachedContent.

The request body contains an instance of CachedContent.

Attributes

contents

Optional. Input only. Immutable. The content to cache.

displayName

Optional. Immutable. The user-generated meaningful display name of the cached content. Maximum 128 Unicode characters.

expiration

Specifies when this resource will expire. Can be either expireTime or ttl.

  • Timestamp in UTC of when this resource is considered expired. Uses RFC 3339 format.
  • New TTL for this resource, input only. A duration in seconds with up to nine fractional digits, ending with 's'.
model

Required. Immutable. The name of the Model to use for cached content. Format: models/{model}.

name

Optional. Identifier. The resource name referring to the cached content. Format: cachedContents/{id}.

systemInstruction

Optional. Input only. Immutable. Developer set system instruction. Currently text only.

toolConfig

Optional. Input only. Immutable. Tool config. This config is shared for all tools.

tools

Optional. Input only. Immutable. A list of Tools the model may use to generate the next response.

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

Attributes

Companion:
object
Graph
Supertypes
trait EnumValue
class Object
trait Matchable
class Any
Known subtypes
object Model.type
object User.type
object ChatRole

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
case class Content(parts: Seq[Part], role: Option[ChatRole])

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
object Content

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Content.type
case class DynamicRetrievalConfig(mode: DynamicRetrievalPredictorMode, dynamicThreshold: Int)

Describes the options to customize dynamic retrieval.

Describes the options to customize dynamic retrieval.

Attributes

dynamicThreshold

The threshold to be used in dynamic retrieval. If not set, a system default value is used.

mode

The mode of the predictor to be used in dynamic retrieval.

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

Attributes

Companion:
object
Graph
Supertypes
trait EnumValue
class Object
trait Matchable
class Any
Known subtypes
object MODE_DYNAMIC.type
object MODE_UNSPECIFIED.type

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait Expiration

Attributes

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

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
case class FunctionDeclaration(name: String, description: String, parameters: Option[Schema], response: Option[Schema])

Structured representation of a function declaration as defined by the OpenAPI 3.03 specification. Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a Tool by the model and executed by the client.

Structured representation of a function declaration as defined by the OpenAPI 3.03 specification. Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a Tool by the model and executed by the client.

Attributes

description

Required. A brief description of the function.

name

Required. The name of the function. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63.

parameters

Optional. Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.

response

Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.

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

Attributes

Companion:
object
Graph
Supertypes
trait EnumValue
class Object
trait Matchable
class Any
Known subtypes
object BLOCK_NONE.type
object BLOCK_ONLY_HIGH.type
object OFF.type

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait HarmCategory 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 HarmProbability extends EnumValue

Attributes

Companion:
object
Graph
Supertypes
trait EnumValue
class Object
trait Matchable
class Any
Known subtypes
object HIGH.type
object LOW.type
object MEDIUM.type
object NEGLIGIBLE.type

Attributes

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

Attributes

Companion:
object
Graph
Supertypes
trait EnumValue
class Object
trait Matchable
class Any
Known subtypes
object AUDIO.type
object DOCUMENT.type
object IMAGE.type
object TEXT.type
object VIDEO.type
object Modality

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
case class Model(name: String, baseModelId: Option[String], version: String, displayName: String, description: Option[String], inputTokenLimit: Int, outputTokenLimit: Int, supportedGenerationMethods: Seq[String], temperature: Option[Double], maxTemperature: Option[Double], topP: Option[Double], topK: Option[Int])

Attributes

baseModelId

Required. The name of the base model, pass this to the generation request. Examples: gemini-1.5-flash

description

A short description of the model.

displayName

The human-readable name of the model. E.g. "Gemini 1.5 Flash". The name can be up to 128 characters long and can consist of any UTF-8 characters.

inputTokenLimit

Maximum number of input tokens allowed for this model.

maxTemperature

The maximum temperature this model can use.

name

Required. The resource name of the Model. Refer to Model variants for all allowed values. Format: models/{model} with a {model} naming convention of: "{baseModelId}-{version}" Examples: models/gemini-1.5-flash-001

outputTokenLimit

Maximum number of output tokens available for this model.

supportedGenerationMethods

The model's supported generation methods. The corresponding API method names are defined as Pascal case strings, such as generateMessage and generateContent.

temperature

Controls the randomness of the output. Values can range over [0.0,maxTemperature], inclusive. A higher value will produce responses that are more varied, while a value closer to 0.0 will typically result in less surprising responses from the model. This value specifies default to be used by the backend while making the call to the model.

topK

For Top-k sampling. Top-k sampling considers the set of topK most probable tokens. This value specifies default to be used by the backend while making the call to the model. If empty, indicates the model doesn't use top-k sampling, and topK isn't allowed as a generation parameter.

topP

For Nucleus sampling. Nucleus sampling considers the smallest set of tokens whose probability sum is at least topP. This value specifies default to be used by the backend while making the call to the model.

version

Required. The version number of the model. This represents the major version (1.0 or 1.5)

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

Attributes

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

Attributes

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

Attributes

Companion:
object
Graph
Supertypes
trait EnumValue
class Object
trait Matchable
class Any
Known subtypes
object executableCode.type
object fileData.type
object functionCall.type
object functionResponse.type
object inlineData.type
object text.type
object PartPrefix

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
case class Schema(`type`: SchemaType, format: Option[String], description: Option[String], nullable: Option[Boolean], enum: Option[Seq[String]], maxItems: Option[String], minItems: Option[String], properties: Option[Map[String, Schema]], required: Option[Seq[String]], propertyOrdering: Option[Seq[String]], items: Option[Schema])

The Schema object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an OpenAPI 3.0 schema object.

The Schema object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an OpenAPI 3.0 schema object.

Attributes

`type`

Required. Data type.

description

Optional. A brief description of the parameter. This could contain examples of use. Parameter description may be formatted as Markdown.

enum

Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}

format

Optional. The format of the data. This is used only for primitive datatypes. Supported formats: for NUMBER type: float, double for INTEGER type: int32, int64 for STRING type: enum

items

Optional. Schema of the elements of Type.ARRAY.

maxItems

Optional. Maximum number of the elements for Type.ARRAY.

minItems

Optional. Minimum number of the elements for Type.ARRAY.

nullable

Optional. Indicates if the value may be null.

properties

Optional. Properties of Type.OBJECT. An object containing a list of "key": value pairs.

propertyOrdering

Optional. The order of the properties. Not a standard field in open api spec. Used to determine the order of the properties in the response.

required

Optional. Required properties of Type.OBJECT.

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

Attributes

Companion:
object
Graph
Supertypes
trait EnumValue
class Object
trait Matchable
class Any
Known subtypes
object ARRAY.type
object BOOLEAN.type
object INTEGER.type
object NUMBER.type
object OBJECT.type
object STRING.type
object TYPE_UNSPECIFIED.type
object SchemaType

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait Tool

Attributes

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

Attributes

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

Attributes

Companion:
object
Graph
Supertypes
trait EnumValue
class Object
trait Matchable
class Any
Known subtypes
object codeExecution.type
object googleSearch.type
object ToolPrefix

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type