Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
chore(sample): Monorepo Migration Completed and Deprecate (#514)
Browse files Browse the repository at this point in the history
* migrate and delete

* change folder

* typo
  • Loading branch information
yil532 committed Mar 9, 2023
1 parent fc0ecdf commit b659679
Show file tree
Hide file tree
Showing 49 changed files with 1 addition and 3,553 deletions.
1 change: 0 additions & 1 deletion samples/AUTHORING_GUIDE.md

This file was deleted.

1 change: 0 additions & 1 deletion samples/CONTRIBUTING.md

This file was deleted.

222 changes: 1 addition & 221 deletions samples/snippets/README.rst
Original file line number Diff line number Diff line change
@@ -1,221 +1 @@

.. This file is automatically generated. Do not edit this file directly.
Dialogflow CX API Python Samples
===============================================================================

.. image:: https://gstatic.com/cloudssh/images/open-btn.png
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=/README.rst


This directory contains samples for Dialogflow CX API. The `Dialogflow CX API`_ enables you to create conversational experiences across devices and platforms.




.. _Dialogflow CX API: https://cloud.google.com/dialogflow/cx/docs/


Setup
-------------------------------------------------------------------------------



Authentication
++++++++++++++

This sample requires you to have authentication setup. Refer to the
`Authentication Getting Started Guide`_ for instructions on setting up
credentials for applications.

.. _Authentication Getting Started Guide:
https://cloud.google.com/docs/authentication/getting-started




Install Dependencies
++++++++++++++++++++

#. Clone python-docs-samples and change directory to the sample directory you want to use.

.. code-block:: bash
$ git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git
#. Install `pip`_ and `virtualenv`_ if you do not already have them. You may want to refer to the `Python Development Environment Setup Guide`_ for Google Cloud Platform for instructions.

.. _Python Development Environment Setup Guide:
https://cloud.google.com/python/setup

#. Create a virtualenv. Samples are compatible with Python 3.6+.

.. code-block:: bash
$ virtualenv env
$ source env/bin/activate
#. Install the dependencies needed to run the samples.

.. code-block:: bash
$ pip install -r requirements.txt
.. _pip: https://pip.pypa.io/
.. _virtualenv: https://virtualenv.pypa.io/






Samples
-------------------------------------------------------------------------------


Detect Intent Text
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

.. image:: https://gstatic.com/cloudssh/images/open-btn.png
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=/detect_intent_texts.py,/README.rst




To run this sample:

.. code-block:: bash
$ python detect_intent_texts.py
usage: detect_intent_texts.py [-h] --agent AGENT [--session-id SESSION_ID]
[--language-code LANGUAGE_CODE]
texts [texts ...]
DialogFlow API Detect Intent Python sample with text inputs.
Examples:
python detect_intent_texts.py -h
python detect_intent_texts.py --agent AGENT --session-id SESSION_ID "hello" "book a meeting room" "Mountain View"
python detect_intent_texts.py --agent AGENT --session-id SESSION_ID "tomorrow" "10 AM" "2 hours" "10 people" "A" "yes"
positional arguments:
texts Text inputs.
optional arguments:
-h, --help show this help message and exit
--agent AGENT Agent resource name. Required.
--session-id SESSION_ID
Identifier of the DetectIntent session. Defaults to a
random UUID.
--language-code LANGUAGE_CODE
Language code of the query. Defaults to "en-US".
Detect Intent Audio
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

.. image:: https://gstatic.com/cloudssh/images/open-btn.png
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=/detect_intent_audio.py,/README.rst




To run this sample:

.. code-block:: bash
$ python detect_intent_audio.py
usage: detect_intent_audio.py [-h] --agent AGENT [--session-id SESSION_ID]
[--language-code LANGUAGE_CODE]
--audio-file-path AUDIO_FILE_PATH
DialogFlow API Detect Intent Python sample with audio file.
Examples:
python detect_intent_audio.py -h
python detect_intent_audio.py --agent AGENT --session-id SESSION_ID --audio-file-path resources/hello.wav
optional arguments:
-h, --help show this help message and exit
--agent AGENT Agent resource name. Required.
--session-id SESSION_ID
Identifier of the DetectIntent session. Defaults to a
random UUID.
--language-code LANGUAGE_CODE
Language code of the query. Defaults to "en-US".
--audio-file-path AUDIO_FILE_PATH
Path to the audio file.
Detect Intent Stream
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

.. image:: https://gstatic.com/cloudssh/images/open-btn.png
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=/detect_intent_stream.py,/README.rst




To run this sample:

.. code-block:: bash
$ python detect_intent_stream.py
usage: detect_intent_stream.py [-h] --agent AGENT [--session-id SESSION_ID]
[--language-code LANGUAGE_CODE]
--audio-file-path AUDIO_FILE_PATH
DialogFlow API Detect Intent Python sample with audio files processed as an audio stream.
Examples:
python detect_intent_stream.py -h
python detect_intent_stream.py --agent AGENT --session-id SESSION_ID --audio-file-path resources/hello.wav
optional arguments:
-h, --help show this help message and exit
--agent AGENT Agent resource name. Required.
--session-id SESSION_ID
Identifier of the DetectIntent session. Defaults to a
random UUID.
--language-code LANGUAGE_CODE
Language code of the query. Defaults to "en-US".
--audio-file-path AUDIO_FILE_PATH
Path to the audio file.
The client library
-------------------------------------------------------------------------------

This sample uses the `Google Cloud Client Library for Python`_.
You can read the documentation for more details on API usage and use GitHub
to `browse the source`_ and `report issues`_.

.. _Google Cloud Client Library for Python:
https://googlecloudplatform.github.io/google-cloud-python/
.. _browse the source:
https://github.com/GoogleCloudPlatform/google-cloud-python
.. _report issues:
https://github.com/GoogleCloudPlatform/google-cloud-python/issues



.. _Google Cloud SDK: https://cloud.google.com/sdk/
The samples have migrated, please see the samples on https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/dialogflow-cx.
25 changes: 0 additions & 25 deletions samples/snippets/README.rst.in

This file was deleted.

40 changes: 0 additions & 40 deletions samples/snippets/create_agent.py

This file was deleted.

41 changes: 0 additions & 41 deletions samples/snippets/create_agent_test.py

This file was deleted.

Loading

0 comments on commit b659679

Please sign in to comment.