ruby_conversations 1.1.27 → 1.1.28

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: c97c61d4668c44abec236c0c85e8eb7719c6103223fd91029552224f3f9f39d5
4
- data.tar.gz: a0f879b4f8953baa783c7fa82a93115729ba6b598b4a00488861fc7bfc7771e0
3
+ metadata.gz: 0c42d08c544fa112491d5de540359bb2db85c0ea0f94999305b8a6bd9a76e337
4
+ data.tar.gz: b3d7ca190f6d84da60754f07a67114d27d21d345bf1a6f606b8aa2ab999c69b9
5
5
  SHA512:
6
- metadata.gz: 5f01767b8a2c726fa1758a81cdbbce86de796ca88b1d8dbfe46a43e463f817c3ebf89afe7d52b581067aeea128334d79ab8f8307d84822cc1ec1a34ab665ae06
7
- data.tar.gz: e86e9a59d36012074a886b5c2417c3d5ad8285314516464bbca3a9c419d137c94ec1faadd27a0f5c365c521adbf98d6aac164f8fb58a6bb8c0669856f9e4737e
6
+ metadata.gz: 82b105029c7f3580c2f7feab4ec3412e3566c1a1b486e062b4be5368d5fd35e0dd93c67f4b8d46aa1a37e43172af38ee8ffcdabab3016d8b332fa41af31dcf35
7
+ data.tar.gz: be066e59065b7f75160ce17937a73bf77ba38436d0eeaf6bfeec18c9fd31409800b13468002a893b8c55f11519e1510166040af26a052dd3b1015293e1e2810c
@@ -18,14 +18,13 @@ module RubyConversations
18
18
  def initialize(attributes = {})
19
19
  setup_attributes(attributes)
20
20
  configure_llm_credentials
21
- configure_prompt_caching
22
21
  end
23
22
 
24
23
  def chat
25
- @chat ||= build_chat
24
+ @chat ||= build_chat_with_caching
26
25
  rescue RubyLLM::ModelNotFoundError
27
26
  RubyLLM.models.refresh!
28
- @chat ||= build_chat
27
+ @chat ||= build_chat_with_caching
29
28
  end
30
29
 
31
30
  def model_identifier
@@ -79,6 +78,12 @@ module RubyConversations
79
78
  end
80
79
  end
81
80
 
81
+ def build_chat_with_caching
82
+ chat_instance = build_chat
83
+ chat_instance.cache_prompts(system: true, tools: true, user: true)
84
+ chat_instance
85
+ end
86
+
82
87
  def build_chat
83
88
  chat_instance = RubyLLM.chat(model: llm, provider: provider).with_temperature(0.0)
84
89
  headers = guardrail_headers
@@ -96,9 +101,5 @@ module RubyConversations
96
101
  'X-Amzn-Bedrock-GuardrailVersion' => config.bedrock_guardrail_version || 'DRAFT'
97
102
  }
98
103
  end
99
-
100
- def configure_prompt_caching
101
- chat.cache_prompts(system: true, tools: true, user: true)
102
- end
103
104
  end
104
105
  end
@@ -3,7 +3,7 @@
3
3
  module RubyConversations
4
4
  MAJOR = 1
5
5
  MINOR = 1
6
- PATCH = 27
6
+ PATCH = 28
7
7
 
8
8
  VERSION = "#{RubyConversations::MAJOR}.#{RubyConversations::MINOR}.#{RubyConversations::PATCH}".freeze
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_conversations
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.27
4
+ version: 1.1.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Shippy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-02-13 00:00:00.000000000 Z
11
+ date: 2026-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport