omniai-openai 1.3.0 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OmniAI
4
+ module OpenAI
5
+ # An OpenAI scope for establishing threads.
6
+ class Threads
7
+ # @param client [OmniAI::OpenAI::Client] required
8
+ def initialize(client:)
9
+ @client = client
10
+ end
11
+
12
+ # @param id [String] required
13
+ def find(id:)
14
+ Thread.find(id:, client: @client)
15
+ end
16
+
17
+ # @param id [String] required
18
+ def destroy!(id:)
19
+ Thread.destroy!(id:, client: @client)
20
+ end
21
+
22
+ # @param metadata [Hash] optional
23
+ # @param tool_resources [Hash] optional
24
+ def build(metadata: {}, tool_resources: {})
25
+ Thread.new(metadata:, tool_resources:, client: @client)
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OmniAI
4
+ module OpenAI
5
+ # An set of tools.
6
+ module Tool
7
+ FILE_SEARCH = { type: 'file_search' }.freeze
8
+ CODE_INTERPRETER = { type: 'code_interpreter' }.freeze
9
+ end
10
+ end
11
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAI
4
4
  module OpenAI
5
- VERSION = '1.3.0'
5
+ VERSION = '1.3.2'
6
6
  end
7
7
  end
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.3.0
4
+ version: 1.3.2
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-06-21 00:00:00.000000000 Z
11
+ date: 2024-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: event_stream_parser
@@ -62,10 +62,21 @@ files:
62
62
  - Gemfile
63
63
  - README.md
64
64
  - lib/omniai/openai.rb
65
+ - lib/omniai/openai/assistant.rb
66
+ - lib/omniai/openai/assistants.rb
65
67
  - lib/omniai/openai/chat.rb
66
68
  - lib/omniai/openai/client.rb
67
69
  - lib/omniai/openai/config.rb
70
+ - lib/omniai/openai/file.rb
71
+ - lib/omniai/openai/files.rb
68
72
  - lib/omniai/openai/speak.rb
73
+ - lib/omniai/openai/thread.rb
74
+ - lib/omniai/openai/thread/message.rb
75
+ - lib/omniai/openai/thread/messages.rb
76
+ - lib/omniai/openai/thread/run.rb
77
+ - lib/omniai/openai/thread/runs.rb
78
+ - lib/omniai/openai/threads.rb
79
+ - lib/omniai/openai/tool.rb
69
80
  - lib/omniai/openai/transcribe.rb
70
81
  - lib/omniai/openai/version.rb
71
82
  homepage: https://github.com/ksylvest/omniai-openai