wit-ai / pywit

Python library for Wit.ai
Other
1.45k stars 359 forks source link

Added new function 'intent_list' #153

Closed Sharan-Babu closed 3 years ago

Sharan-Babu commented 3 years ago

Returns names of all intents associated with your app.

chessai commented 3 years ago

This looks good, except I think we want to add the optional arguments 'headers=None' and 'verbose=None' to the arguments of intent_list. Something like:

    def intent_list(self, headers=None, verbose=None):
        """
        Returns names of all intents associated with your app.
        """
        params = {}
        headers = headers or {}
        if verbose:
            params['verbose'] = True
        resp = req(self.logger, self.access_token, 'GET', '/intents', params, headers=headers)
        return resp 
Sharan-Babu commented 3 years ago

Hi, I have added the optional arguments. Please let me know how it looks now. I am planning to add functions for all the other API methods as well. Does that sound good?

I also have an idea which is to implement a PR system for Wit apps to make it easy for a large number of people to collaborate. Imagine, people sending pull requests with new utterances for an intent, and they get queued for training if merged by repo maintainer. Right now, you can only give full access to your app by letting others join as a contributor. Is this a good idea?

Sharan-Babu commented 3 years ago

2 doubts: 1) Is this an active repo? 2) If I want to create an unofficial wrapper with additional functionalities on top of Wit, could I use this repo (along with the license) as a base for that?

chessai commented 3 years ago

2 doubts: 1) Is this an active repo? 2) If I want to create an unofficial wrapper with additional functionalities on top of Wit, could I use this repo (along with the license) as a base for that?

  1. Yes this is an active repo, though much of the time we are busy dealing with other things internally, so not paying enough attention to the external clients. I am going to be working on improving the situation over the next few months

  2. You are free to create whatever you want, so long as proper licensing is given if you use our code.

chessai commented 3 years ago

Hi, I have added the optional arguments. Please let me know how it looks now. I am planning to add functions for all the other API methods as well. Does that sound good?

I also have an idea which is to implement a PR system for Wit apps to make it easy for a large number of people to collaborate. Imagine, people sending pull requests with new utterances for an intent, and they get queued for training if merged by repo maintainer. Right now, you can only give full access to your app by letting others join as a contributor. Is this a good idea?

  1. Yes, that sounds great!

  2. Yes, that seems like a good idea, though I haven't had time to think about the specifics.