wit-ai / pywit

Python library for Wit.ai
Other
1.46k stars 361 forks source link

My entities are empty #54

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hi guys, first of all thank you for your amazing tool ! :)

I've been playing with it a bit and I have a weird bug I think with the pywit api, I can't get any entities it is all empty. In the log part of the wit admin I have this message : intent(null)=default_intent. Do you have any hint ?

Best regards. Way.

l5t commented 8 years ago

Maybe your app was not yet trained. It seems to work now. Remember, the more examples you validate the better Wit will be at extracting entities.

ghost commented 8 years ago

Hi @l5t I think there is maybe a bug in the pywit api because no entities are returned. Other users got the same issue, see this thread : https://github.com/wit-ai/pywit/issues/53 Best regards, Way.

PabloVallejo commented 8 years ago

hi @waylander47 and @l5t

I have the same issue, the method getForecast is being called with its first argument as an UUID object and its second one as an empty dict.

# >>> 1ad02df5493f11e6-b9e8-d0e140
# >>> {} 

Any ideas on how to fix it?

ghost commented 8 years ago

Hi @PabloVallejo

I decided to use the converse method from the Wit object. You can call it like that : my_wit_object.converse(session_id, message, context, verbose) The context and verbose parameters are not mandatory. To begin a conversation with your bot.

Way.

ghost commented 8 years ago

Hi @PabloVallejo @datatec24 @adavanisanti @l5t

In the wit.py line 106 (in your site package folder where your wit installation reside) you need to add two parameters to the function call : rst['entities'] and user_message. Like that you get two more parameters the entities and the user message.

Best regards, Way.

PabloVallejo commented 8 years ago

@waylander47 I installed the package directly from master and it works perfectly 💯

This is rare given that master as 698ce62 is tagged as the last version in pip.

ghost commented 8 years ago

Hi @PabloVallejo Thanks for the tip. Yes the version has changed they have updated the code I think.

l5t commented 8 years ago

Sorry for the late reply, can you try pip install --upgrade and try again