Google Dialogflow V2 的 C# 库

C# library for Google Dialogflow V2

Google Dialogflow V2 似乎有 2 个 C# 库:

Google.Apis.Dialogflow.v2: https://www.nuget.org/packages/Google.Apis.Dialogflow.v2/

但是,在文档页面 (https://dialogflow.com/docs/sdks#v2_client_libraries), C# library is Google.Cloud.Dialogflow.V2. I can see a lot of codes in Google documents are using this library only. For example https://cloud.google.com/dialogflow-enterprise/docs/delete-intent

不知道开发应该用哪一个?

谢谢大家

您应该像在 Listing and Deleting Intents documentation, that you refer to. Since you are going to take examples from the examples already provide on GitHub code 中那样使用 using Google.Cloud.Dialogflow.V2;,您必须拥有相同的库。

Google APIs .Net client libray 专为与 Google API 一起使用而设计。 API 类 是直接从发现服务 API.

以编程方式生成的

如果您正在使用 Google 云平台 API 对话流,请考虑使用 Cloud Client Libraries for .NET instead。这些是专门针对 Google 云平台服务的新的惯用 .NET 库。

您可能会使用其中任何一个。但是 google 建议您使用 Google 云客户端库进行对话流 api。

生产中的开发人员联系测试版

我联系了该库的一位开发人员,询问他对在生产中使用云库的看法,尽管它仍处于测试阶段。

Yes, it's stable enough to use in a production environment. I'm actually looking at trying to push a bunch of these libraries to GA - mostly we're just missing some reviews and samples.

Dialogflow can be a pain in terms of writing web hooks in C#, because you need to use the protobuf parsing (basically see the docs page) and you can't currently use Dialogflow beta or it spits out enum values we can't parse. Outside of web hooks, it should be fine :)