omniai-openai 1.3.3 → 1.5.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/Gemfile +1 -1
- data/lib/omniai/openai/chat.rb +1 -0
- data/lib/omniai/openai/client.rb +4 -3
- data/lib/omniai/openai/thread/messages.rb +0 -1
- data/lib/omniai/openai/thread/run.rb +1 -1
- data/lib/omniai/openai/thread/runs.rb +3 -4
- data/lib/omniai/openai/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9541bdbe54c24be244b7bacd347eb4457d2f8686151cec1d4474889bf23bf6d0
|
4
|
+
data.tar.gz: 5fabc408441ca53da67d05f221d14cb74f6c178e30696ec1a76598adb18ec4c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48b237f8d606fff3d8db2aecac46633d6bebbae3c403ce2f68d9d87ecac0fe7beb101ada9be12d15e2d1bf734ef86dab92ff7cbf56298311634e44584b9b7cce
|
7
|
+
data.tar.gz: 4627a44685b895c4b2616de3a88ba8b4bb63b038efc7f0536aacc7b9108e373f78d690acdc5adc99635dc9c8e10c6b1e59161643fdf7c3db283a012f1166a9bb
|
data/Gemfile
CHANGED
data/lib/omniai/openai/chat.rb
CHANGED
data/lib/omniai/openai/client.rb
CHANGED
@@ -67,10 +67,11 @@ module OmniAI
|
|
67
67
|
# @param format [Symbol] optional :text or :json
|
68
68
|
# @param temperature [Float, nil] optional
|
69
69
|
# @param stream [Proc, nil] optional
|
70
|
+
# @param tools [Array<OmniAI::Tool>, nil] optional
|
70
71
|
#
|
71
72
|
# @return [OmniAI::Chat::Completion]
|
72
|
-
def chat(messages, model: Chat::DEFAULT_MODEL, temperature: nil, format: nil, stream: nil)
|
73
|
-
Chat.process!(messages, model:, temperature:, format:, stream:, client: self)
|
73
|
+
def chat(messages, model: Chat::DEFAULT_MODEL, temperature: nil, format: nil, stream: nil, tools: nil)
|
74
|
+
Chat.process!(messages, model:, temperature:, format:, stream:, tools:, client: self)
|
74
75
|
end
|
75
76
|
|
76
77
|
# @raise [OmniAI::Error]
|
@@ -82,7 +83,7 @@ module OmniAI
|
|
82
83
|
# @param temperature [Float, nil] optional
|
83
84
|
# @param format [Symbol] :text, :srt, :vtt, or :json (default)
|
84
85
|
#
|
85
|
-
# @return
|
86
|
+
# @return [OmniAI::Transcribe]
|
86
87
|
def transcribe(path, model: Transcribe::Model::WHISPER, language: nil, prompt: nil, temperature: nil, format: nil)
|
87
88
|
Transcribe.process!(path, model:, language:, prompt:, temperature:, format:, client: self)
|
88
89
|
end
|
@@ -34,7 +34,6 @@ module OmniAI
|
|
34
34
|
# @param content [String, Array, nil] optional
|
35
35
|
# @param attachments [Array, nil] optional
|
36
36
|
# @param metadata [Hash, nil] optional
|
37
|
-
# @param client [OmniAI::OpenAI::Client] optional
|
38
37
|
# @return [OmniAI::OpenAI::Thread::Message]
|
39
38
|
def build(role: nil, content: nil, attachments: [], metadata: {})
|
40
39
|
Message.new(role:, content:, attachments:, metadata:, thread_id: @thread.id, client: @client)
|
@@ -31,12 +31,11 @@ module OmniAI
|
|
31
31
|
end
|
32
32
|
|
33
33
|
# @param assistant_id [String] required
|
34
|
-
# @param model [String] optional
|
35
|
-
# @param temperature [Float] optional
|
36
|
-
# @param instructions [String] optional
|
34
|
+
# @param model [String, nil] optional
|
35
|
+
# @param temperature [Float, nil] optional
|
36
|
+
# @param instructions [String, nil] optional
|
37
37
|
# @param tools [Array<Hash>, nil] optional
|
38
38
|
# @param metadata [Hash, nil] optional
|
39
|
-
# @param client [OmniAI::OpenAI::Client] optional
|
40
39
|
# @return [OmniAI::OpenAI::Thread::Message]
|
41
40
|
def build(assistant_id:, model: nil, temperature: nil, instructions: nil, tools: nil, metadata: {})
|
42
41
|
Run.new(
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniai-openai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Sylvestre
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: event_stream_parser
|
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
- !ruby/object:Gem::Version
|
106
106
|
version: '0'
|
107
107
|
requirements: []
|
108
|
-
rubygems_version: 3.5.
|
108
|
+
rubygems_version: 3.5.14
|
109
109
|
signing_key:
|
110
110
|
specification_version: 4
|
111
111
|
summary: A generalized framework for interacting with OpenAI
|