-
Notifications
You must be signed in to change notification settings - Fork 24
Error: One or more required fields were not set on the message #24
Comments
I was facing the same issue Make sure you are passing api_key, type, user_id, time_stamp(not require/ if you pass send in required format), platform in required data type Fallowing code work for me msg.send();` |
@parimalyeole Please make sure that, when setting the timestamp field, it is of type number not string so: |
@cristiancavalli same is also mention in the documentation of "chatbase-node" but when we look at the chatbase documentation I don't know how that is working... |
@parimalyeole you 100% correct, please leave the timestamp code as it. There is a bug which will prevent you from using it the other way I intended which I will post a patch for soon. I was able to get your snippet working though so perhaps the a variable you are supplying to the newMessage function is empty or not of type string? (both api-key and userid must be strings): chatbase.newMessage('an-api-key', '123')
.setPlatform('INTERWEBZ')
.setMessage('test')
.setVersion('1.0')
.setIntent('test-me')
.setAsTypeAgent()
.setTimestamp(Date.now().toString())
.send()
.then(msg => console.log(msg.getCreateResponse()))
.catch(err => console.error(err)); please lmk if this does not work for you |
@parimalyeole I think I identified and fixed the issue: due to an api change the field |
@parimalyeole this has now been updated in version Thank you for your patience and raising this issue! |
@cristiancavalli, Thanks!!! |
i made a chatbot for room reservation and if i give the old date like 20/2/2010 it is not showing error that this date is already gone i want a solution for this pls help me how do i do that it will show error or not accept the out dated year or month.. |
I am trying to implement the chatbase analytics for dialogflow agent using dialogflow google cloud function.
When I send the chatbase message independently using the sample nodejs function. It sends the message to chatbase without any issues and I can able to view the analytics in chatbase dashboard. But copied the same code to dialogflow cloud function it throws the following error.
Error: One or more required fields were not set on the message, please check the documentation on how to set the following message fields: api_key, type, user_id, time_stamp, platform, message at RequiredKeysNotSet
I have set all the required fields but it still throwing an error. Tried for both single and multiple messages. Attached the sample code here.
I am using the following chatbase dependency
@google/chatbase": "^1.1.1"
The text was updated successfully, but these errors were encountered: