Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update minds #47

Merged
merged 6 commits into from
Nov 22, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion minds/minds.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def __init__(
self.parameters = parameters
self.created_at = created_at
self.updated_at = updated_at

self.datasources = datasources

def __repr__(self):
Expand Down Expand Up @@ -101,9 +100,20 @@ def update(
f'/projects/{self.project}/minds/{self.name}',
data=data
)

if name is not None and name != self.name:
self.name = name

refreshed_mind = self.client.minds.get(self.name)
self.model_name = refreshed_mind.model_name
Better-Boy marked this conversation as resolved.
Show resolved Hide resolved
self.provider = refreshed_mind.provider
self.prompt_template = refreshed_mind.prompt_template
self.parameters = refreshed_mind.parameters
self.created_at = refreshed_mind.created_at
self.updated_at = refreshed_mind.updated_at
self.datasources = refreshed_mind.datasources
Better-Boy marked this conversation as resolved.
Show resolved Hide resolved


def add_datasource(self, datasource: Datasource):
"""
Add datasource to mind
Expand Down