Skip to content

Commit d7e20a7

Browse files
Merge pull request #205 from mindsdb/bugfix/add_skills_extra_params_to_agent
Added the skills_extra_parameters Parameter to Agents
2 parents db19045 + 3996304 commit d7e20a7

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

mindsdb_sdk/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__title__ = 'mindsdb_sdk'
22
__package_name__ = 'mindsdb_sdk'
3-
__version__ = '3.4.5'
3+
__version__ = '3.4.6'
44
__description__ = "MindsDB Python SDK, provides an SDK to use a remote mindsdb instance"
55
__email__ = "[email protected]"
66
__author__ = 'MindsDB Inc'

mindsdb_sdk/agents.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def __init__(
8787
data: dict = {},
8888
prompt_template: str = None,
8989
params: dict = {},
90+
skills_extra_parameters: dict = {},
9091
collection: CollectionBase = None
9192
):
9293
self.name = name
@@ -98,6 +99,7 @@ def __init__(
9899
self.data = data
99100
self.prompt_template = prompt_template
100101
self.params = params
102+
self.skills_extra_parameters = skills_extra_parameters
101103
self.collection = collection
102104

103105
def completion(self, messages: List[dict]) -> AgentCompletion:
@@ -190,10 +192,16 @@ def __eq__(self, other):
190192
return False
191193
if self.provider != other.provider:
192194
return False
195+
if self.data != other.data:
196+
return False
197+
if self.prompt_template != other.prompt_template:
198+
return False
193199
if self.skills != other.skills:
194200
return False
195201
if self.params != other.params:
196202
return False
203+
if self.skills_extra_parameters != other.skills_extra_parameters:
204+
return False
197205
if self.created_at != other.created_at:
198206
return False
199207
return self.updated_at == other.updated_at
@@ -216,6 +224,7 @@ def from_json(cls, json: dict, collection: CollectionBase):
216224
json.get('data', {}),
217225
json.get('prompt_template'),
218226
json.get('params', {}),
227+
json.get('skills_extra_parameters', {}),
219228
collection
220229
)
221230

tests/test_sdk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1508,7 +1508,7 @@ def test_update(self, mock_put, mock_get):
15081508
},
15091509
'data': {
15101510
'tables': ['test_database.test_table'],
1511-
'knowledge_bases': ['test_kb'],
1511+
'knowledge_bases': ['test_kb', 'test_kb2'],
15121512
},
15131513
'created_at': created_at,
15141514
'updated_at': updated_at,

0 commit comments

Comments
 (0)