omniai-google 3.22.0 → 3.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/omniai/google/embed.rb +5 -2
- data/lib/omniai/google/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5b5542c78680371ff3d0e4268303377d97e71867bb1116811852ee7ef7e6c397
|
|
4
|
+
data.tar.gz: ea3ee571ac27dca8d87c75b314961e2ac23b5ef0bc860c3aab84c0f1d4680e87
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 777e0f53cd5943ef85795e2a141164bc3206db3ba9a340d0001bdc95a296b2ffa88ef5f786ee7c1f15c3500dab679f8878253956ad38879518aa82a9226fa54a
|
|
7
|
+
data.tar.gz: 341ab1bf0279b58e7ff94d62a36243598f86b3a5766cb3490913d7e1e6beb9509defe80f28540c9b2371a04d630a56324532b7d16e3dcb1ee6be3efe294b4d04
|
data/lib/omniai/google/embed.rb
CHANGED
|
@@ -15,7 +15,10 @@ module OmniAI
|
|
|
15
15
|
TEXT_EMBEDDING_005 = "text-embedding-005"
|
|
16
16
|
TEXT_MULTILINGUAL_EMBEDDING_002 = "text-multilingual-embedding-002"
|
|
17
17
|
GEMINI_EMBEDDING_001 = "gemini-embedding-001"
|
|
18
|
+
# Preview of GEMINI_EMBEDDING_2.
|
|
18
19
|
GEMINI_EMBEDDING_2_PREVIEW = "gemini-embedding-2-preview"
|
|
20
|
+
# Vertex serves it at global, us and eu only.
|
|
21
|
+
GEMINI_EMBEDDING_2 = "gemini-embedding-2"
|
|
19
22
|
EMBEDDING = TEXT_EMBEDDING_004
|
|
20
23
|
MULTILINGUAL_EMBEDDING = TEXT_MULTILINGUAL_EMBEDDING_002
|
|
21
24
|
end
|
|
@@ -80,7 +83,7 @@ module OmniAI
|
|
|
80
83
|
protected
|
|
81
84
|
|
|
82
85
|
# Determines which endpoint to use based on client and model configuration.
|
|
83
|
-
# Routes gemini-embedding-2
|
|
86
|
+
# Routes gemini-embedding-2* models to embedContent on Vertex, as Google's
|
|
84
87
|
# Vertex AI requires this endpoint for newer multimodal embedding models.
|
|
85
88
|
#
|
|
86
89
|
# @return [Symbol] :embed_content, :predict, or :batch_embed_contents
|
|
@@ -113,7 +116,7 @@ module OmniAI
|
|
|
113
116
|
end
|
|
114
117
|
end
|
|
115
118
|
|
|
116
|
-
# Builds payload for the Vertex embedContent endpoint (gemini-embedding-2
|
|
119
|
+
# Builds payload for the Vertex embedContent endpoint (gemini-embedding-2* models).
|
|
117
120
|
# @return [Hash]
|
|
118
121
|
def embed_content_payload
|
|
119
122
|
raise ArgumentError, "embedContent does not support batch input" if @input.is_a?(Array) && @input.length > 1
|