Class: OmniAI::Google::Embed
- Inherits:
-
Embed
- Object
- Embed
- OmniAI::Google::Embed
- Defined in:
- lib/omniai/google/embed.rb
Overview
An Google embed implementation.
Usage:
input = "..."
response = OmniAI::Google::Embed.process!(input, client: client)
response.embedding [0.0, ...]
Defined Under Namespace
Modules: Model
Constant Summary collapse
- DEFAULT_MODEL =
Model::EMBEDDING
- EMBEDDINGS_DESERIALIZER =
proc do |data, *| data['embeddings'].map { || ['values'] } end
- CONTEXT =
Context.build do |context| context.deserializers[:embeddings] = EMBEDDINGS_DESERIALIZER end