Geminix.V1beta.TunedModels (geminix v0.2.0)
Summary
Functions
Enqueues a batch of EmbedContent requests for batch processing.
Enqueues a batch of GenerateContent requests for batch processing.
Generates a model response given an input GenerateContentRequest.
Generates a response from the model given an input message.
Generates a streamed response from the model given an input GenerateContentRequest.
Transfers ownership of the tuned model.
Functions
@spec async_batch_embed_content( binary(), Geminix.V1beta.AsyncBatchEmbedContentRequest.t(), keyword() ) :: {:ok, Geminix.V1beta.Operation.t()} | {:error, {:invalid_data, Ecto.Changeset.t()}} | {:error, {:bad_request, Req.Response.t()}}
Enqueues a batch of EmbedContent requests for batch processing.
We have a BatchEmbedContents handler in GenerativeService, but it was synchronized. So we name this one to be Async to avoid confusion.
@spec batch_generate_content( binary(), Geminix.V1beta.BatchGenerateContentRequest.t(), keyword() ) :: {:ok, Geminix.V1beta.Operation.t()} | {:error, {:invalid_data, Ecto.Changeset.t()}} | {:error, {:bad_request, Req.Response.t()}}
Enqueues a batch of GenerateContent requests for batch processing.
@spec generate_content(binary(), Geminix.V1beta.GenerateContentRequest.t(), keyword()) :: {:ok, Geminix.V1beta.GenerateContentResponse.t()} | {:error, {:invalid_data, Ecto.Changeset.t()}} | {:error, {:bad_request, Req.Response.t()}}
Generates a model response given an input GenerateContentRequest.
Refer to the text generation guide for detailed usage information. Input capabilities differ between models, including tuned models. Refer to the model guide and tuning guide for details.
@spec generate_text(binary(), Geminix.V1beta.GenerateTextRequest.t(), keyword()) :: {:ok, Geminix.V1beta.GenerateTextResponse.t()} | {:error, {:invalid_data, Ecto.Changeset.t()}} | {:error, {:bad_request, Req.Response.t()}}
Generates a response from the model given an input message.
@spec stream_generate_content( binary(), Geminix.V1beta.GenerateContentRequest.t(), keyword() ) :: {:ok, Geminix.V1beta.GenerateContentResponse.t()} | {:error, {:invalid_data, Ecto.Changeset.t()}} | {:error, {:bad_request, Req.Response.t()}}
Generates a streamed response from the model given an input GenerateContentRequest.
@spec transfer_ownership( binary(), Geminix.V1beta.TransferOwnershipRequest.t(), keyword() ) :: {:ok, Geminix.V1beta.TransferOwnershipResponse.t()} | {:error, {:invalid_data, Ecto.Changeset.t()}} | {:error, {:bad_request, Req.Response.t()}}
Transfers ownership of the tuned model.
This is the only way to change ownership of the tuned model. The current owner will be downgraded to writer role.