-
Notifications
You must be signed in to change notification settings - Fork 443
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
Dialogflow API, support for versions and environments #2622
Comments
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
|
Hi @lorenzosfarra, 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). Thanks again. |
@lorenzosfarra were you able to proceed using gRPC? |
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>
.
--
lorenzosfarra@ubuntu.com,lorenzosfarra@gmail.com
http://lorenzosfarra.com/
@lrnzsfr
|
Hi John, 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:
Restarting php7.3-fpm:
Ad adding the As you said, I have been able to change the way I generate session names from:
to
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. |
Hi,
I would like to integrate the Dialogflow environments feature in my code.
The feature is currently in beta, but I think it should be possible somehow to try it (sorry if I have missed how).
Currently, when getting a session, we use the following code (kind of):
Where the method
sessionName()
is defined insrc/V2/Gapic/SessionsGapicClient.php
as:and
getSessionNameTemplate()
as:Now, per documentation, we should:
A possible solution is something like this (not tested, just guessing logically):
First, should be modify the
sessionName
method as follows to add a possible 3rd param, the environment, and use a different template in case it's notnull
:and to create a
getSessionNameWithEnvironmentTemplate()
method as follows: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 :)
Thanks,
Lorenzo
The text was updated successfully, but these errors were encountered: