foobara-ai 0.0.11 → 0.0.12

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc15c8346f2afa89586829dba2c16741e63838012af8120b790018941cda79b4
4
- data.tar.gz: 942a26bfe13bdc7d51deeb800bcbdd6d7ee1b7ccbe696ff26b233ff27bbbe256
3
+ metadata.gz: a43321389b2cc813a204d4f7340b75c8a7c7bdd131220fae16682602258caab9
4
+ data.tar.gz: f5cf356dc3f0411bf0e2ffb50772828ed3cd8f729552ca16d385c55f01a00e83
5
5
  SHA512:
6
- metadata.gz: 8664935bc503f4531bdbe7a801e3c6d7968cf25a1a1b2ac2cf7a1c6edef9c06c51119499fe8a3e59e41d3afda1662766049cd49a43d1c0d3fc8d581e8877b9d5
7
- data.tar.gz: 10bb054e4e6d56c9fa69e30aa5b18f49bf660dd6795f51d03bf362b3efdabbca9a62810a2958eb3eaebaa897225b0900aa494da7787c255248cacfb357bca84a
6
+ metadata.gz: 672cac03fe0c5b0ac8f2dfa2182f37ebdd1399a71721994f2699a9f54cc3a75522cfa8dcdea03442569fdecd4df7cc6b1e040fda1d62720ddd8c8fd1ccfa2c19
7
+ data.tar.gz: 16364632be158b69c7ae22d48b0d98b1bd1c3c88aad2e2b57a648b2bd5d2b8185fe866302280c769bfee0fb20bebe3edb0c25fc7ec6c9c1dba6da504e5a00f08
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.0.12] - 2025-05-27
2
+
3
+ - Do not load service models in parallel due to undiagnosed race condition somewhere
4
+
1
5
  ## [0.0.11] - 2025-03-06
2
6
 
3
7
  - Fix bug that broke ListModels
@@ -5,16 +5,27 @@ module Foobara
5
5
  module Ai
6
6
  module AnswerBot
7
7
  module Types
8
- threads = AI_SERVICES.keys.map do |service|
9
- Thread.new do
10
- service_models = AnswerBot.foobara_domain_map!(service).run!
11
- service_models.map do |model|
12
- AnswerBot.foobara_domain_map!(model, to: :string)
13
- end
8
+ models = []
9
+ AI_SERVICES.each_key do |service|
10
+ service_models = AnswerBot.foobara_domain_map!(service).run!
11
+ service_models.map do |model|
12
+ models << AnswerBot.foobara_domain_map!(model, to: :string)
14
13
  end
15
14
  end
16
15
 
17
- models = threads.each(&:join).map(&:value).flatten
16
+ # Doing this in a threaded fashion creates a race condition somewhere for some unidentified reason
17
+ # so commenting this all out for now.
18
+ #
19
+ # threads = AI_SERVICES.keys.map do |service|
20
+ # Thread.new do
21
+ # service_models = AnswerBot.foobara_domain_map!(service).run!
22
+ # service_models.map do |model|
23
+ # AnswerBot.foobara_domain_map!(model, to: :string)
24
+ # end
25
+ # end
26
+ # end
27
+ #
28
+ # models = threads.each(&:join).map(&:value).flatten
18
29
 
19
30
  unless models.uniq == models
20
31
  # :nocov:
@@ -2,10 +2,10 @@ module Foobara
2
2
  module Ai
3
3
  module AnswerBot
4
4
  module Types
5
- services = %w[
6
- open-ai
7
- anthropic
8
- ollama
5
+ services = [
6
+ "open-ai",
7
+ "anthropic",
8
+ "ollama"
9
9
  ]
10
10
 
11
11
  ServiceEnum = Foobara::Enumerated.make_module(services)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-ai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-06 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  email:
13
13
  - azimux@gmail.com
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  - !ruby/object:Gem::Version
63
63
  version: '0'
64
64
  requirements: []
65
- rubygems_version: 3.6.5
65
+ rubygems_version: 3.6.7
66
66
  specification_version: 4
67
67
  summary: No description. Add one.
68
68
  test_files: []