Skip to content

Commit f820b6b

Browse files
updated the docstrings
1 parent 70d168f commit f820b6b

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

mindsdb_sdk/agents.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
from mindsdb_sdk.skills import Skill
1111
from mindsdb_sdk.utils.objects_collection import CollectionBase
1212

13-
_DEFAULT_LLM_MODEL = 'gpt-4o'
14-
_DEFAULT_LLM_PROMPT = 'Answer the user"s question in a helpful way: {{question}}'
15-
1613

1714
class AgentCompletion:
1815
"""
@@ -59,17 +56,19 @@ class Agent:
5956
6057
Create a new agent:
6158
62-
>>> model = models.get('my_model') # Or use models.create(...)
63-
>>> # Connect your agent to a MindsDB table.
64-
>>> text_to_sql_skill = skills.create('text_to_sql', 'sql', { 'tables': ['my_table'], 'database': 'my_database' })
65-
>>> agent = agents.create('my_agent', model, [text_to_sql_skill])
59+
>>> agent = agents.create(
60+
'my_agent',
61+
model={
62+
'name': 'gpt-3.5-turbo',
63+
'provider': 'openai',
64+
'api_key': 'your_openai_api_key_here'
65+
},
66+
data={'tables': ['my_database.my_table'], 'knowledge_base': 'my_kb'}
67+
)
6668
6769
Update an agent:
6870
69-
>>> new_model = models.get('new_model')
70-
>>> agent.model_name = new_model.name
71-
>>> new_skill = skills.create('new_skill', 'sql', { 'tables': ['new_table'], 'database': 'new_database' })
72-
>>> updated_agent.skills.append(new_skill)
71+
>>> agent.data['tables'].append('my_database.my_new_table')
7372
>>> updated_agent = agents.update('my_agent', agent)
7473
7574
Delete an agent by name:

0 commit comments

Comments
 (0)