minds_sdk 1.0.2 → 1.1.0

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: b32ab83f5a90b8f8c141e49f2400baf8cf814fa7d12c69179e08331aa59015ee
4
- data.tar.gz: fee41037555281a744762a86027baa86b57e2b99d5e5a856afe964ce5cc32dcb
3
+ metadata.gz: ac43c5b8357b515c69241475ef036f61883fd8fc4a4e693dacf60f4fb046b284
4
+ data.tar.gz: bb9b63eaf02ab0dfb1333588771ae3f893191efe46c41f9956cf74575ba439b8
5
5
  SHA512:
6
- metadata.gz: d3000a41cccc11aed03e74a79c682828c7d292e7c7beede12b88a48184fc16f1b15fed241dba13afeaae8f496231d193e540fd9ae59e5d0d258e39316a2ded16
7
- data.tar.gz: 7d14957aa73db5434eb5bb49ba9f9fc82342954f987926414efb9eaeef92e540d2d5e50ddc550d100e1a4e80ad052aef5b6a0114b38b7c4b79aec8a4a771ba14
6
+ metadata.gz: 783c67217b99f88df67dadfa58eaccabaadfcce50460cdb2085701e51866a73580aae5d28a850a48fe3b2e65b1c5758a92bcd66aa655a3c8dafb3b1381586eef
7
+ data.tar.gz: 7ccb9a82511e2e57082d4c043796919c4755caedc23fa6b729d681f73b9a6027abd45a36e8c1160924387f066a84807a3a3a8663329814d01a123f6ff6cc1de7
data/CHANGELOG.md CHANGED
@@ -5,22 +5,22 @@
5
5
  ### Added
6
6
  - Initial release of the Minds Ruby SDK
7
7
  - Implemented `Minds::Client` for configuring and initializing the SDK
8
- - Added `Minds::Resources::Datasources` for managing data sources:
8
+ - Added `Minds::Datasources` for managing data sources:
9
9
  - `create`: Create a new datasource
10
10
  - `all`: List all datasources
11
11
  - `find`: Get a datasource by name
12
12
  - `destroy`: Delete a datasource
13
- - Added `Minds::Resources::Minds` for managing minds:
13
+ - Added `Minds::Minds` for managing minds:
14
14
  - `all`: List all minds
15
15
  - `find`: Get a mind by name
16
16
  - `create`: Create a new mind
17
17
  - `destroy`: Delete a mind
18
- - Implemented `Minds::Resources::Mind` class with methods:
18
+ - Implemented `Minds::Mind` class with methods:
19
19
  - `update`: Update mind properties
20
20
  - `add_datasources`: Add a datasource to a mind
21
21
  - `destroy_datasources`: Remove a datasource from a mind
22
22
  - `completion`: Call mind completion (with streaming support)
23
- - Added support for various datasource types through `DatabaseConfig` class
23
+ - Added support for various datasource types through `Minds::DatabaseConfig` class
24
24
  - Implemented error handling with custom error classes
25
25
  - Added YARD-style documentation for all public methods
26
26
 
@@ -37,7 +37,7 @@ module Minds
37
37
  # @option ds_config [String] :description Description of the database. Used by mind to understand what data can be retrieved from it.
38
38
  # @option ds_config [Hash] :connection_data (optional) Credentials to connect to the database
39
39
  # @option ds_config [Array<String>] :tables (optional) List of allowed tables
40
- # @param update [Boolean] If true, to update datasourse if exists, default is false
40
+ # @param update [Boolean] If true, to update datasource if exists, default is false
41
41
  # @return [Datasource] The created datasource object
42
42
  # @raise [ObjectNotSupported] If datasource type is not supported
43
43
  #
data/lib/minds/minds.rb CHANGED
@@ -5,7 +5,7 @@ require "uri"
5
5
 
6
6
  module Minds
7
7
  DEFAULT_PROMPT_TEMPLATE = "Use your database tools to answer the user's question: {{question}}"
8
-
8
+ DEFAULT_MODEL = "gpt-4o"
9
9
  class Mind
10
10
  attr_reader :name, :model_name, :provider, :parameters, :created_at, :updated_at, :datasources, :prompt_template
11
11
 
@@ -230,7 +230,7 @@ module Minds
230
230
  parameters["prompt_template"] ||= DEFAULT_PROMPT_TEMPLATE
231
231
  data = {
232
232
  name: name,
233
- model_name: model_name,
233
+ model_name: model_name || DEFAULT_MODEL,
234
234
  provider: provider,
235
235
  parameters: parameters,
236
236
  datasources: ds_names
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "uri"
4
+
3
5
  module Minds
4
6
  module RestClient
5
7
  def get(path:)
@@ -26,14 +28,15 @@ module Minds
26
28
 
27
29
  def delete(path:, parameters: nil)
28
30
  conn.delete(uri(path: path)) do |req|
29
- req.body = parameters.to_json
31
+ req.body = parameters.to_json unless parameters.nil?
30
32
  end&.body
31
33
  end
32
34
 
33
35
  private
34
36
 
35
37
  def uri(path:)
36
- return path if @base_url.include?(@api_version)
38
+ base_path = URI(@base_url).path
39
+ return path if base_path.split("/").include?(@api_version)
37
40
 
38
41
  "/#{@api_version}/#{path}"
39
42
  end
data/lib/minds/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Minds
4
- VERSION = "1.0.2"
3
+ module Minds
4
+ VERSION = "1.1.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minds_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - tungnt
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-30 00:00:00.000000000 Z
11
+ date: 2025-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  requirements: []
94
- rubygems_version: 3.2.22
94
+ rubygems_version: 3.4.1
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: Minds Ruby SDK provides an interface to interact with the Minds AI system