ruby_conversations 1.1.7 → 1.1.9

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: 2ebb363ba1641264fc3c57b883c1d7419db801343e1d8463eb8158887f31ae7e
4
- data.tar.gz: fa041b97787b8bc6dbe318edeb547f86fff198ebae3d3632c9b8f1a9311b0ae0
3
+ metadata.gz: 4f2cb9e5a52975ccabe21ecccfa7bafe5e26b7ecb6d514fe980f81753250a713
4
+ data.tar.gz: 497333af80cca4c934437bc80cb47da7e59fd268fd4f2c466458fe34e27e2cd5
5
5
  SHA512:
6
- metadata.gz: 06e4c6c77049cda35384763920f278869ddfdd2e93eb2e7ed660c25686ebbd10407b96c9da37bbfb9f36186da0a75c53845a6eee85b06cd0ded8ba513c231d9d
7
- data.tar.gz: 47fe53756c3312e24d1b9396c8c102bd79aebc7244b6547397345fb7e9b276d070150d07224bfac11e63223ffa4297c066b015566172650a44835f17c9758419
6
+ metadata.gz: c041d0eb232f25469b2e844a444b38e3901a92e38d57509d9e56840eb022e540e00c210e1a71616bd8a9510601c8d8eb0147cc237da8963d84125a65ce2e732f
7
+ data.tar.gz: 4defc9e92a63048e486cde78655914851586215cf13de41ac89c4bc2822cd3fc1064a8bfe027db9f98df1b998d8716881f67e836787c20b24c45c27da6b8ca57
@@ -44,12 +44,7 @@ module RubyConversations
44
44
  end
45
45
 
46
46
  def llm
47
- case model_identifier
48
- when 'claude-3-7-sonnet'
49
- 'us.anthropic.claude-3-7-sonnet-20250219-v1:0'
50
- else
51
- model_identifier
52
- end
47
+ model_identifier
53
48
  end
54
49
 
55
50
  private
@@ -20,6 +20,22 @@ module RubyConversations
20
20
  extract_template_metadata(template_data)
21
21
  end
22
22
 
23
+ # Fetch metadata for all available templates
24
+ # @return [Array<Hash>] Array of template metadata including fields and UI configuration
25
+ def all_templates
26
+ begin
27
+ templates_data = RubyConversations.client.fetch_all_conversation_templates
28
+ rescue RubyConversations::ClientError => e
29
+ raise RubyConversations::TemplateNotFoundError, 'Failed to fetch templates' if e.status_code == 404
30
+
31
+ raise e
32
+ end
33
+
34
+ return [] unless templates_data.is_a?(Array)
35
+
36
+ templates_data.map { |template_data| extract_template_metadata(template_data) }.compact
37
+ end
38
+
23
39
  private
24
40
 
25
41
  def extract_template_metadata(template_data)
@@ -68,6 +68,13 @@ module RubyConversations
68
68
  handle_response(response)
69
69
  end
70
70
 
71
+ # Fetch all available conversation templates
72
+ # @return [Array<Hash>] Array of template data including messages and prompts
73
+ def fetch_all_conversation_templates
74
+ response = client.get('api/ai_conversations')
75
+ handle_response(response)
76
+ end
77
+
71
78
  # Fetch a prompt by name
72
79
  # @param name [String] The name of the prompt to fetch
73
80
  # @return [Hash] The prompt attributes
@@ -6,7 +6,7 @@ module RubyConversations
6
6
  attr_accessor :api_url, :jwt_secret, :default_llm_model, :default_llm_provider
7
7
 
8
8
  def initialize
9
- @default_llm_model = 'claude-3-7-sonnet'
9
+ @default_llm_model = 'claude-sonnet-4'
10
10
  @default_llm_provider = 'bedrock'
11
11
  end
12
12
 
@@ -3,7 +3,7 @@
3
3
  module RubyConversations
4
4
  MAJOR = 1
5
5
  MINOR = 1
6
- PATCH = 7
6
+ PATCH = 9
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.7
4
+ version: 1.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Shippy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-28 00:00:00.000000000 Z
11
+ date: 2025-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport