omniai-google 3.19.0 → 3.22.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/README.md +107 -0
- data/lib/omniai/google/chat.rb +5 -0
- data/lib/omniai/google/client.rb +59 -5
- data/lib/omniai/google/config.rb +6 -0
- data/lib/omniai/google/embed.rb +6 -1
- data/lib/omniai/google/live/connection.rb +253 -0
- data/lib/omniai/google/live/event.rb +49 -0
- data/lib/omniai/google/live.rb +411 -0
- data/lib/omniai/google/transcribe/gemini.rb +218 -0
- data/lib/omniai/google/transcribe.rb +22 -0
- data/lib/omniai/google/transcribe_helpers.rb +4 -0
- data/lib/omniai/google/unknown_location_error.rb +17 -0
- data/lib/omniai/google/version.rb +1 -1
- data/lib/omniai/google/vertex.rb +25 -0
- metadata +21 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OmniAI
|
|
4
|
+
module Google
|
|
5
|
+
# Vertex AI endpoints.
|
|
6
|
+
module Vertex
|
|
7
|
+
MULTI_REGIONS = %w[us eu].freeze
|
|
8
|
+
|
|
9
|
+
# The host serving a location, derived the way Google's own SDKs do (google-genai, vertexai).
|
|
10
|
+
#
|
|
11
|
+
# @param location_id [String] e.g. "global", "us" or "us-central1"
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
def self.host(location_id)
|
|
15
|
+
if location_id.eql?("global")
|
|
16
|
+
"https://aiplatform.googleapis.com"
|
|
17
|
+
elsif MULTI_REGIONS.include?(location_id)
|
|
18
|
+
"https://aiplatform.#{location_id}.rep.googleapis.com"
|
|
19
|
+
else
|
|
20
|
+
"https://#{location_id}-aiplatform.googleapis.com"
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniai-google
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.22.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kevin Sylvestre
|
|
@@ -79,6 +79,20 @@ dependencies:
|
|
|
79
79
|
- - ">="
|
|
80
80
|
- !ruby/object:Gem::Version
|
|
81
81
|
version: '0'
|
|
82
|
+
- !ruby/object:Gem::Dependency
|
|
83
|
+
name: websocket-driver
|
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
|
85
|
+
requirements:
|
|
86
|
+
- - ">="
|
|
87
|
+
- !ruby/object:Gem::Version
|
|
88
|
+
version: '0'
|
|
89
|
+
type: :runtime
|
|
90
|
+
prerelease: false
|
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
92
|
+
requirements:
|
|
93
|
+
- - ">="
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: '0'
|
|
82
96
|
- !ruby/object:Gem::Dependency
|
|
83
97
|
name: zeitwerk
|
|
84
98
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -123,12 +137,18 @@ files:
|
|
|
123
137
|
- lib/omniai/google/credentials.rb
|
|
124
138
|
- lib/omniai/google/embed.rb
|
|
125
139
|
- lib/omniai/google/incomplete_stream_error.rb
|
|
140
|
+
- lib/omniai/google/live.rb
|
|
141
|
+
- lib/omniai/google/live/connection.rb
|
|
142
|
+
- lib/omniai/google/live/event.rb
|
|
126
143
|
- lib/omniai/google/stream_error.rb
|
|
127
144
|
- lib/omniai/google/transcribe.rb
|
|
145
|
+
- lib/omniai/google/transcribe/gemini.rb
|
|
128
146
|
- lib/omniai/google/transcribe_helpers.rb
|
|
147
|
+
- lib/omniai/google/unknown_location_error.rb
|
|
129
148
|
- lib/omniai/google/upload.rb
|
|
130
149
|
- lib/omniai/google/upload/file.rb
|
|
131
150
|
- lib/omniai/google/version.rb
|
|
151
|
+
- lib/omniai/google/vertex.rb
|
|
132
152
|
homepage: https://github.com/ksylvest/omniai-google
|
|
133
153
|
licenses:
|
|
134
154
|
- MIT
|