GeminiService

io.cequence.openaiscala.gemini.service.GeminiService
trait GeminiService extends CloseableService with GeminiServiceConsts

Attributes

Graph
Supertypes
trait CloseableService
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Inherited classlikes

Attributes

Inherited from:
GeminiServiceConsts
Graph
Supertypes
class Object
trait Matchable
class Any

Value members

Abstract methods

def createCachedContent(cachedContent: CachedContent): Future[CachedContent]

Creates CachedContent resource.

Creates CachedContent resource.

Attributes

Returns:

If successful, the response body contains a newly created instance of CachedContent.

See also:
def deleteCachedContent(name: String): Future[Unit]

Deletes CachedContent resource.

Deletes CachedContent resource.

Attributes

See also:

The Gemini API supports content generation with images, audio, code, tools, and more. For details on each of these features, read on and check out the task-focused sample code, or read the comprehensive guides.

The Gemini API supports content generation with images, audio, code, tools, and more. For details on each of these features, read on and check out the task-focused sample code, or read the comprehensive guides.

Attributes

contents

For single-turn queries, this is a single instance. For multi-turn queries like chat, this is a repeated field that contains the conversation history and the latest request.

Returns:

generate content response

See also:
def generateContentStreamed(contents: Seq[Content], settings: GenerateContentSettings): Source[GenerateContentResponse, NotUsed]

The Gemini API supports content generation with images, audio, code, tools, and more. For details on each of these features, read on and check out the task-focused sample code, or read the comprehensive guides with streamed response.

The Gemini API supports content generation with images, audio, code, tools, and more. For details on each of these features, read on and check out the task-focused sample code, or read the comprehensive guides with streamed response.

Attributes

contents

For single-turn queries, this is a single instance. For multi-turn queries like chat, this is a repeated field that contains the conversation history and the latest request.

Returns:

generate content response

See also:
def getCachedContent(name: String): Future[CachedContent]

Reads CachedContent resource.

Reads CachedContent resource.

Attributes

See also:
def listCachedContents(pageSize: Option[Int], pageToken: Option[String]): Future[ListCachedContentsResponse]

Lists CachedContents.

Lists CachedContents.

Attributes

pageSize

Optional. The maximum number of cached contents to return. The service may return fewer than this value. If unspecified, some default (under maximum) number of items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken

Optional. A page token, received from a previous cachedContents.list call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to cachedContents.list must match the call that provided the page token.

See also:
def listModels(pageSize: Option[Int], pageToken: Option[String]): Future[ListModelsResponse]

Lists the Models available through the Gemini API.

Lists the Models available through the Gemini API.

Attributes

pageSize

The maximum number of Models to return (per page). If unspecified, 50 models will be returned per page. This method returns at most 1000 models per page, even if you pass a larger pageSize.

pageToken

A page token, received from a previous models.list call. Provide the pageToken returned by one request as an argument to the next request to retrieve the next page. When paginating, all other parameters provided to models.list must match the call that provided the page token.

See also:
def updateCachedContent(name: String, expiration: Expiration): Future[CachedContent]

Updates CachedContent resource (only expiration is updatable).

Updates CachedContent resource (only expiration is updatable).

Attributes

name

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

Returns:

If successful, the response body contains an updated instance of CachedContent.

See also:

Inherited methods

def close(): Unit

Closes the underlying ws client, and releases all its resources.

Closes the underlying ws client, and releases all its resources.

Attributes

Inherited from:
CloseableService

Inherited fields

protected val coreUrl: String

Attributes

Inherited from:
GeminiServiceConsts