ai-chat 0.2.1 → 0.2.2

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/ai-chat.gemspec +1 -1
  3. data/lib/ai/chat.rb +0 -33
  4. metadata +4 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b050afeef6a27a67c0125c131e9f2825a0201cf1c1781f7f87750705b150ea8
4
- data.tar.gz: d87412fd5c1439eaad5eba3d919b6cbb7dfc795e762199beaeb28825dc1d0281
3
+ metadata.gz: 1b59ea831d946cd885c9df7c8524d0bd4cf26361ad9190780969698ac8db8b36
4
+ data.tar.gz: e21d404bc9c5e0ab5e1f0951053a6c159393f81f743460fdafbca0d032542895
5
5
  SHA512:
6
- metadata.gz: d7e6064820465b1ce64d2fa551e5e92fdf4bb74f6a817e4473a28f69541e431cd84deec12dce1df08fba16041baf27f120e7b37ec6721d40201d138f7f563f69
7
- data.tar.gz: f13ebe743b083cd8089fa28e1de37750416b03ce0414eb0b754454f16a1b0bd080abb71c6e2c5b966462b6bda5dc9893dfd530060997a177fce493b1e0782eee
6
+ metadata.gz: a94b918c1feecb3e9983a0d3c0411469084f3529167a45119ff77609adad1efc1c7ae2907817a6737ae865507d6e84eeeb8e24387b4da27fede223d3ed20f5a4
7
+ data.tar.gz: c5f9508ac39c6b952724ebf9ac7dbef96418e5f59f8ce520f314a5255dad4065b500537daa3f108fe8640f9f015b7c2c6b48722dfaa1ddf641bbee8b4a4d5164
data/ai-chat.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "ai-chat"
5
- spec.version = "0.2.1"
5
+ spec.version = "0.2.2"
6
6
  spec.authors = ["Raghu Betina"]
7
7
  spec.email = ["raghu@firstdraft.com"]
8
8
  spec.homepage = "https://github.com/firstdraft/ai-chat"
data/lib/ai/chat.rb CHANGED
@@ -385,7 +385,6 @@ module AI
385
385
  }
386
386
  }
387
387
  end
388
- tools_list
389
388
  end
390
389
 
391
390
  # :reek:DuplicateMethodCall
@@ -427,37 +426,5 @@ module AI
427
426
 
428
427
  image_filenames
429
428
  end
430
-
431
- # :reek:UtilityFunction
432
- # :reek:ManualDispatch
433
- def extract_text_from_response(response)
434
- response.output.flat_map { |output|
435
- output.respond_to?(:content) ? output.content : []
436
- }.compact.find { |content|
437
- content.is_a?(OpenAI::Models::Responses::ResponseOutputText)
438
- }&.text
439
- end
440
-
441
- # :reek:UtilityFunction
442
- def wrap_schema_if_needed(schema)
443
- if schema.key?(:format) || schema.key?("format")
444
- schema
445
- elsif (schema.key?(:name) || schema.key?("name")) &&
446
- (schema.key?(:schema) || schema.key?("schema")) &&
447
- (schema.key?(:strict) || schema.key?("strict"))
448
- {
449
- format: schema.merge(type: :json_schema)
450
- }
451
- else
452
- {
453
- format: {
454
- type: :json_schema,
455
- name: "response",
456
- schema: schema,
457
- strict: true
458
- }
459
- }
460
- end
461
- end
462
429
  end
463
430
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ai-chat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raghu Betina
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-08-05 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: openai
@@ -94,14 +93,13 @@ dependencies:
94
93
  - - "~>"
95
94
  - !ruby/object:Gem::Version
96
95
  version: '11.1'
97
- description:
98
96
  email:
99
97
  - raghu@firstdraft.com
100
98
  executables: []
101
99
  extensions: []
102
100
  extra_rdoc_files:
103
- - README.md
104
101
  - LICENSE
102
+ - README.md
105
103
  files:
106
104
  - LICENSE
107
105
  - README.md
@@ -119,7 +117,6 @@ metadata:
119
117
  label: AI Chat
120
118
  rubygems_mfa_required: 'true'
121
119
  source_code_uri: https://github.com/firstdraft/ai-chat
122
- post_install_message:
123
120
  rdoc_options: []
124
121
  require_paths:
125
122
  - lib
@@ -134,8 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
131
  - !ruby/object:Gem::Version
135
132
  version: '0'
136
133
  requirements: []
137
- rubygems_version: 3.4.6
138
- signing_key:
134
+ rubygems_version: 3.7.1
139
135
  specification_version: 4
140
136
  summary: A beginner-friendly Ruby interface for OpenAI's API
141
137
  test_files: []