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 +4 -4
- data/CHANGELOG.md +4 -4
- data/lib/minds/datasources.rb +1 -1
- data/lib/minds/minds.rb +2 -2
- data/lib/minds/rest_client.rb +5 -2
- data/lib/minds/version.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac43c5b8357b515c69241475ef036f61883fd8fc4a4e693dacf60f4fb046b284
|
4
|
+
data.tar.gz: bb9b63eaf02ab0dfb1333588771ae3f893191efe46c41f9956cf74575ba439b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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::
|
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::
|
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::
|
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
|
|
data/lib/minds/datasources.rb
CHANGED
@@ -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
|
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
|
data/lib/minds/rest_client.rb
CHANGED
@@ -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
|
-
|
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
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
|
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:
|
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.
|
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
|