foobara-open-ai-api 0.0.12 → 0.0.13

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: b3c5966b6692ffdef84569de5e5087aade3acb26a9d1d9883fff6a0e090c26a8
4
- data.tar.gz: bd73776101d5e3fa6d1e8f731892161c88ef8f58b3938d2750cd90430da097bf
3
+ metadata.gz: 1175861cd5bffc59f8a8983870d47446203f26dca35f0b2d97460a9790a9b8f4
4
+ data.tar.gz: bfcd6da5578334bd366dca4f0685c32f64188235fba1b2e44816bcf7f5a5db60
5
5
  SHA512:
6
- metadata.gz: 713b5bdc80f81c35da510acc44aff511de9e9eff0100fddc808d49a4c93e64fea826d604d610a9ced37682c10e957af76f8dd06fd2ef4a0a3b0899d0110e60d0
7
- data.tar.gz: 4a3828d31cea93a4b8163a62182bf3bb2521acf23ba2679c21274b73fa31eab86bd57998aceae94bf0149349648a4eee0db882ecc95f961f15040390d63fd93f
6
+ metadata.gz: 92c60ee4452241731ff44bd19b04c080a5ccaffd193820ae7fcd175f00679dc5071b10a9285241cd4bcbba1f89b820d4ca46df2f5684c553a9224710c46d513f
7
+ data.tar.gz: 67db120db8e7ac0d2bc6071bbcffc3109d542142c3956895d9df1ceca541833553dec075a4408307960428fd990ff8b67ecd50e009559c394a874e2afbc941e0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.0.13] - 2025-03-01
2
+
3
+ - Add temperature to CreateChatCompletion inputs
4
+
1
5
  ## [0.0.12] - 2025-03-01
2
6
 
3
7
  - Rename :model to :model_enum to avoid collision with Model in filesystems that are case-insensitive
@@ -10,15 +10,16 @@ module Foobara
10
10
  add_inputs do
11
11
  model :model_enum, default: Types::ModelEnum::GPT_3_5_TURBO
12
12
  messages :array do
13
- role :string, one_of: %w[system user assistant]
13
+ role :string, one_of: ["system", "user", "assistant"]
14
14
  content :string
15
15
  end
16
+ temperature :float
16
17
  end
17
18
 
18
19
  result Types::ChatCompletion
19
20
 
20
21
  def build_request_body
21
- self.request_body = { model:, messages: }
22
+ self.request_body = { model:, messages:, temperature: }
22
23
  end
23
24
 
24
25
  def build_result
@@ -8,7 +8,7 @@ module Foobara
8
8
  index :integer
9
9
  message Message
10
10
  logprobs :duck # what is this? null in documentation
11
- finish_reason :string, one_of: %w[stop] # what are the real values here?
11
+ finish_reason :string, one_of: ["stop"] # what are the real values here?
12
12
  end
13
13
  end
14
14
  end
@@ -5,7 +5,7 @@ module Foobara
5
5
  class ChatCompletion < Foobara::Model
6
6
  class Message < Foobara::Model
7
7
  attributes do
8
- role :string, one_of: %w[assistant user system]
8
+ role :string, one_of: ["assistant", "user", "system"]
9
9
  content :string
10
10
  refusal :string, :allow_nil
11
11
  end
@@ -12,7 +12,7 @@ module Foobara
12
12
  system_fingerprint :string, :allow_nil
13
13
  choices [Choice]
14
14
  usage Usage
15
- service_tier :string, :allow_nil, one_of: %w[auto default]
15
+ service_tier :string, :allow_nil, one_of: ["auto", "default"]
16
16
  end
17
17
  end
18
18
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-open-ai-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-01 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: foobara-cached-command
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  - !ruby/object:Gem::Version
84
84
  version: '0'
85
85
  requirements: []
86
- rubygems_version: 3.6.3
86
+ rubygems_version: 3.6.9
87
87
  specification_version: 4
88
88
  summary: Foobara commands and models for OpenAI's API
89
89
  test_files: []