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

Added Chatbot functions in SDK #178

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

parthiv11
Copy link

@parthiv11 parthiv11 commented Dec 14, 2024

fixes #165

  • added list, create, get, update, delete/drop functionality for chatbot
py.sdk.mdb.mp4

@mindsdb-devops
Copy link

mindsdb-devops commented Dec 14, 2024

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@parthiv11
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

mindsdb-devops added a commit that referenced this pull request Dec 14, 2024
@parthiv11
Copy link
Author

@@ -0,0 +1,174 @@
from typing import List
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the double of chatbots.py, isn't ?

data=payload
)

if inplace:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What could be the reason to update chatbot on server and not update local instance?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's no reason for it 😅😅

Example usage:
>>> chatbot.delete()
"""
self.api.delete_chatbot(self.project.name, self.name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is chatbots.drop(name) method for this

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be used to delete chatbot through it's instance instead of name.

shoud i remove this?


def __repr__(self):
return f"{self.__class__.__name__}({self.project.name}.{self.name})"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an idea what methods could be useful:

  • maybe add 'start'/'stop' methods?
    Also a user would be interested in last error message for chatbot. is it accessible via rest API?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for start stop methos we cane change is_running.

but "last error message", i am unabe to get it clearly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create SDK functions for Chatbots
3 participants