Skip to content
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

Does this API work with DialogFlow V2 and the Oauth2-based authentication method? #20

Open
nimrod-cohen opened this issue Apr 21, 2018 · 7 comments

Comments

@nimrod-cohen
Copy link

if not, do you have any intentions of upgrading?

thanks in advance,

@gambry
Copy link
Contributor

gambry commented Jul 22, 2018

By having a look at https://dialogflow.com/docs/reference/v1-v2-migration-guide-fulfillment , definitelly V2 is not supported.
Also this is only a library, no implementations - i.e. authentication type - are covered. You need to write them yourself.

I believe we need to put some effort all together and upgrade this library to support Dialogflow API v2.

@gambry
Copy link
Contributor

gambry commented Jul 22, 2018

I've started some work in order to support API V2 in here: https://github.com/gambry/dialogflow/tree/v2.x
Contribution are welcome and I'm more than happy to converge the effort (and the code) in here so this remain the main repository.

I personally need just to get working Request and Response webhook models, so I probably won't be able to cover immediately anything not required by these two classes.

I've started by setting up the test framework and a basic test again current code and Dialogflow V1. The current codebase can benefit from this too.
When happy with the test coverage I'll migrate the test and code to V2.

@gambry
Copy link
Contributor

gambry commented Aug 2, 2018

I've migrated the Request model (and dependencies) to V2, I will soon move to the Response and then finally clean up any other bits still in V1.
Contributions are always appreciated as well as @iboldurev merging the work in a branch in this repo.

@gambry
Copy link
Contributor

gambry commented Aug 5, 2018

I completed the first draft of V1 to V2 Api migration for webhook fulfillment.
I was moving to the client bit and then I noticed https://github.com/GoogleCloudPlatform/google-cloud-php-dialogflow , which is the official Detect Intent and Agent APIs PHP sdk.
I believe that one makes iboldurev/dialogflow library obsolete?

The webhook request/response handling is not supported on that library, so in my fork I'm going to delete anything other than the webhook bit and publish it.

I'm still happy to join the forces and doing contribution in a single repo.

In the meanwhile I believe this issue can be closed.

@ctrlaltdylan
Copy link

@gambry do you know if v2 only supports parameter parsing via a webhook?

In v1 we could parse the detected parameters via the API response. I tried using the official v2 PHP SDK by Google, but the PHP Protobuf doesn't seem to be able to parse Parameter data into strings. This is pretty frustrating.

@gambry
Copy link
Contributor

gambry commented Aug 27, 2018

do you know if v2 only supports parameter parsing via a webhook?

@ctrlaltdylan I assume parameters are sent either using webhook or the API, and so I also assume they are handled correctly with the v2 PHP SDK provided by google.

PHP Protobuf doesn't seem to be able to parse Parameter data into strings

I never used Protobuf structure, so I can't help. I'm assuming it has its own setter and getter, you have just to figure out how to call then. Have you tried with magic methods i.e. $parameters[0]->myParameterName or with a getter like $parameters[0]->getMyParameterName()?
I believe only xdebug can help you. :(

This is pretty frustrating.

TBH the migration for the only webhook bit was really difficult and messy. I don't think I'll use the V2 anytime soon, as apparently the only benefit is handling audio and streams rather than only text.

@ctrlaltdylan
Copy link

ctrlaltdylan commented Aug 27, 2018

@gambry I totally agree.

Webhooks just make QA harder, and I don't see much benefit besides Google naturally making you handle storage of parameters in an async way.

I've even opened an issue on the PHP Protobuf client repo, but my issue is one of > 400. I'm putting a lot of faith in Google to not deprecate V1 before they sort out the PHP Protobuf issues and Dialogflow V2 client issues.

I have not tried magic methods! Maybe that's what I was missing. Either way, they don't document that at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants