intelli_agent 0.2.9 → 0.2.10

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 (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/intelli_agent/openai.rb +5 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 586990e6d1d8fa1fb890bb9530d7f175f4f403ed309ca111517755ed5e07c2f3
4
- data.tar.gz: 669c3765fd006605eb86b93a31b90aa4e6101a50820e8e3dd9eaeec54f17f2d0
3
+ metadata.gz: 2e54e7e019c57ad7e17a50264d734c159db622dffb08061b5a272641ab7e5a99
4
+ data.tar.gz: 0e97fcfd1a8feffbdfbbf072b463616d24071ee248a507a706e4d67876597104
5
5
  SHA512:
6
- metadata.gz: 7af7fe5d68898a89ace33fd71a5eeb519566760900c675782d5620ff29c56013b3e6b92e7074b006668cafa825e5b3ce48db5666b61e5140e14903b54874e739
7
- data.tar.gz: dbb26d71d8187090d151436a8ec2229950b13f93f87c228c42cfaaa77ec98762f75f86e9696f1f9a843b0848cfde92a2ca9cd3afdab613cb51d693193ac17fb8
6
+ metadata.gz: '09e61137807a651493053efe64017962fd262595b66230627147f8cb394c6f2dd9dfc6a6e992067e65662f584e6c109f46374d2f7d677fcf10b24a21914b4c41'
7
+ data.tar.gz: 3de2b502fa1cd60094e465d3cef74f58ce1ea31f704293628afbfbf5ce8350c45bfe3132eebec498fd1f674a320cc950901465e1881dea472ea5367e3e70722c
@@ -73,15 +73,15 @@ module IntelliAgent::OpenAI
73
73
  response
74
74
  end
75
75
 
76
- def self.single_prompt(prompt:, model: :gpt_basic, response_format: nil, max_tokens: MAX_TOKENS, store: true, tools: nil, auto_run_functions: false, function_context: nil)
76
+ def self.single_prompt(prompt:, model: :gpt_basic, response_format: nil, max_tokens: MAX_TOKENS, store: true, metadata: nil, tools: nil, auto_run_functions: false, function_context: nil)
77
77
  chat(messages: [{ user: prompt }], model:, response_format:, max_tokens:, store:, tools:, auto_run_functions:, function_context:)
78
78
  end
79
79
 
80
- def self.single_chat(system:, user:, model: :gpt_basic, response_format: nil, max_tokens: MAX_TOKENS, store: true, tools: nil, auto_run_functions: false, function_context: nil)
80
+ def self.single_chat(system:, user:, model: :gpt_basic, response_format: nil, max_tokens: MAX_TOKENS, store: true, metadata: nil, tools: nil, auto_run_functions: false, function_context: nil)
81
81
  chat(messages: [{ system: }, { user: }], model:, response_format:, max_tokens:, store:, tools:, auto_run_functions:, function_context:)
82
82
  end
83
83
 
84
- def self.chat(messages:, model: :gpt_basic, response_format: nil, max_tokens: MAX_TOKENS, store: true, tools: nil, auto_run_functions: false, function_context: nil)
84
+ def self.chat(messages:, model: :gpt_basic, response_format: nil, max_tokens: MAX_TOKENS, store: true, metadata: nil, tools: nil, auto_run_functions: false, function_context: nil)
85
85
  model = select_model(model)
86
86
 
87
87
  # o1 models doesn't support max_tokens, instead max_completion_tokens
@@ -91,7 +91,8 @@ module IntelliAgent::OpenAI
91
91
  messages = parse_messages(messages)
92
92
 
93
93
  parameters = { model:, messages:, store: }
94
-
94
+ parameters[:metadata] = metadata if metadata
95
+
95
96
  parameters[:max_completion_tokens] = max_completion_tokens if is_o1_model
96
97
  parameters[:max_tokens] = max_completion_tokens unless is_o1_model
97
98
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: intelli_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gedean Dias