llm.rb 4.3.0 → 4.3.1
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 +1 -1
- data/lib/llm/providers/gemini/audio.rb +2 -2
- data/lib/llm/providers/gemini.rb +1 -1
- data/lib/llm/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: b04602c6e101c35e64efe688c889da97675ebd112293f3da5b762456a3c15673
|
|
4
|
+
data.tar.gz: 20d63516d9d81661842d29d4e7c34325103cc60bd698f7195b59cc5be44a2ccc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5ff6f85d0ec1c469e9ca9e5cfe310f28293b270f974dd9974d00bbf3b1cf6eb44e52351bf4b9d37e338c33349230bbd98f35d9bdbefe891b6dc402f734721654
|
|
7
|
+
data.tar.gz: 71dd34c25c103c4dd874a9f86ce3628b0abf81538234d3243dbbdf03f685369dab7a052b041c6ef7c088518ae024a4894b09cceaed59a569ad33b0e1af1d5186
|
data/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<p align="center">
|
|
5
5
|
<a href="https://0x1eef.github.io/x/llm.rb?rebuild=1"><img src="https://img.shields.io/badge/docs-0x1eef.github.io-blue.svg" alt="RubyDoc"></a>
|
|
6
6
|
<a href="https://opensource.org/license/0bsd"><img src="https://img.shields.io/badge/License-0BSD-orange.svg?" alt="License"></a>
|
|
7
|
-
<a href="https://github.com/llmrb/llm.rb/tags"><img src="https://img.shields.io/badge/version-4.3.
|
|
7
|
+
<a href="https://github.com/llmrb/llm.rb/tags"><img src="https://img.shields.io/badge/version-4.3.1-green.svg?" alt="Version"></a>
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
10
|
## About
|
|
@@ -39,7 +39,7 @@ class LLM::Gemini
|
|
|
39
39
|
# @param [Hash] params Other parameters (see Gemini docs)
|
|
40
40
|
# @raise (see LLM::Provider#request)
|
|
41
41
|
# @return [LLM::Response]
|
|
42
|
-
def create_transcription(file:, model:
|
|
42
|
+
def create_transcription(file:, model: @provider.default_model, **params)
|
|
43
43
|
res = @provider.complete [
|
|
44
44
|
"Your task is to transcribe the contents of an audio file",
|
|
45
45
|
"Your response should include the transcription, and nothing else",
|
|
@@ -61,7 +61,7 @@ class LLM::Gemini
|
|
|
61
61
|
# @param [Hash] params Other parameters (see Gemini docs)
|
|
62
62
|
# @raise (see LLM::Provider#request)
|
|
63
63
|
# @return [LLM::Response]
|
|
64
|
-
def create_translation(file:, model:
|
|
64
|
+
def create_translation(file:, model: @provider.default_model, **params)
|
|
65
65
|
res = @provider.complete [
|
|
66
66
|
"Your task is to translate the contents of an audio file into English",
|
|
67
67
|
"Your response should include the translation, and nothing else",
|
data/lib/llm/providers/gemini.rb
CHANGED
|
@@ -44,7 +44,7 @@ module LLM
|
|
|
44
44
|
# @param params (see LLM::Provider#embed)
|
|
45
45
|
# @raise (see LLM::Provider#request)
|
|
46
46
|
# @return [LLM::Response]
|
|
47
|
-
def embed(input, model: "
|
|
47
|
+
def embed(input, model: "gemini-embedding-001", **params)
|
|
48
48
|
model = model.respond_to?(:id) ? model.id : model
|
|
49
49
|
path = ["/v1beta/models/#{model}", "embedContent?key=#{@key}"].join(":")
|
|
50
50
|
req = Net::HTTP::Post.new(path, headers)
|
data/lib/llm/version.rb
CHANGED