Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Dialogflow API, support for versions and environments #2622
I would like to integrate the Dialogflow environments feature in my code.
Currently, when getting a session, we use the following code (kind of):
Where the method
Now, per documentation, we should:
A possible solution is something like this (not tested, just guessing logically):
First, should be modify the
and to create a
Let me know if beta features are not available in this SDK by choice, if I have missed it somewhere or if simply this issue makes sense :)
The code above is good enough to generate the new endpoint URL but it's not enough.
Now, the uriTemplate is specified in
If I force the uriTemplate to
The REST URI bindings do not appear to have been updated in the API definition for this feature. However, I believe that it should work if you use gRPC. Have you tried installing the gRPC extension?
You could bypass the formatting method (
I've not been able to dig into this deeply yet, but I wanted to reply and let you know we see it and hopefully help get you moving. If my suggestion doesn't work let me know; I'll keep working on it as soon as I'm able.
Hi and thanks for your reply and support!
I didn't thought about this way to do it (not used gRPC directly).
Hi, I had to suspend the task due to some priorities, but I will be on it again starting from Monday! Hopefully I can add some details in 48/72h.…
On Fri, Jan 24, 2020 at 9:37 PM John Pedrie ***@***.***> wrote: @lorenzosfarra <https://github.com/lorenzosfarra> were you able to proceed using gRPC? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#2622?email_source=notifications&email_token=AANM7MQGYR3FDDZLJXKETJLQ7NGSNA5CNFSM4KJUQ2JKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ4ARYA#issuecomment-578291936>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AANM7MRUYKUCL6ZZLXIOUTTQ7NGSNANCNFSM4KJUQ2JA> .
-- firstname.lastname@example.org,email@example.com http://lorenzosfarra.com/ @lrnzsfr
I did some tests, and it seems they are successful, you were totally right.
Let me know if I need to open a feature request or something in order to have this environment-ready process integrated somehow in this library. EDIT: https://issuetracker.google.com/issues/125939238 seems to be the same feature request!
Thank you very much for your support!
I don't know if it's the right place to share this information, but maybe it can be of some help for other persons having the same problem.
Based on the Install gRPC for PHP doc, on our server (running Ubuntu server 19.10, PHP7.3) I had to install some packages:
and modify /etc/php/7.3/fpm/php.ini adding:
Ad adding the
As you said, I have been able to change the way I generate session names from:
It seems to work just fine.
I'm so glad that worked for you! Sometimes brand new features take some time to bring full support to the REST transport. When you're working with cutting-edge stuff, it's generally best to prefer gRPC if at all possible.
I'd suggest dropping a comment in that issue you linked and let them know that while the clients now offer some support for versions and environments, the REST bindings need to be addressed.