Dfcx-scrapi

Latest version: v1.13.1

Safety actively analyzes 715032 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 7

1.0.5

Features
- Added 2 new methods to `seach_util.py`
- `find_true_routes` extracts all Page and Route data from a given agent and checks to see that there are valid "exit" paths from every page, ensuring that user is able to navigate past the Page and not remain "stuck".
- `find_event_handlers` extracts all of the Event Handlers from every Resource level through the agent (i.e. Flow, Page, Parameter, etc.) and displays metadata about their associated event. The motivation for this is to allow a user to identify patterns that may be detrimental to bot performance or user experience.

Bug Fixes
- Fixed a bug in `operations.py` that was preventing pre-defined credentials from being inherited from the base class

Enhancements
- `reply` method in `conversation.py` can now accept a `current_page` arg that allows the user to specify the specific Page that they would like to start the conversation from if not from the Default Start Page.

Misc.
- Minor updates to CI config to modify when e2e tests should run

1.0.4

Features
- Added `update_entity_type()` method to `entity_types.py`
- Added new functionality to `bulk_intent_to_df` in `intents.py` that allows a user to define a subset of intents to extract from an Agent instead of extracting all Intents and Training Phrases
- Added a new method in `intents.py` called `modify_training_phrase_df()` that is meant to be used in tandem with the following functions:
- `bulk_intent_to_df(mode='advanced')` located in `intents.py`
- `bulk_update_intents_from_dataframe()` located in `dataframe_functions.py`

The new `modify_training_phrase_df()` method allows you to define a third Pandas DataFrame to define "Actions" that you want to take on a subset of the Intent and Training Phrase combinations that you have in your `["phrases"]` dataframe returned from `bulk_intent_to_df(mode='advanced')`. The two primary actions you can perform are `add` and `delete`. You can consider an action such as `move` the combination of `delete` + `add`.

For example, if I wanted to move a Training Phrase `hi` from `IntentA` to `IntentB` I would perform the following actions:
- `delete`, `hi`, `IntentA`
- `add`, `hi`, `IntentB`

The combination of the above is essentially a `move` function.

Bug Fixes
- Fixed an issue in `route_groups_to_dataframe` that caused a failure when the Fulfillment message length was < 1

Enhancements
- Added support for all fulfillment option types in `route_groups_to_dataframe` in `transition_route_groups.py` including `custom_payload`, `liveAgentHandoff`, `conversationSuccess`, `playAudio`, `outputAudioText`
- Improved support for `fulfillment_message` type so that it supports single item fulfillment or lists as supported in the UI. If the UI designer provides more than one fulfillment message, the dataframe will provide the messages back in list format

Misc.
- Fixed relative links in README

Code Samples

Easy Entity Update
python
e_map = e.get_entities_map(agent_id=scratch_agent, reverse=True)
e.update_entity_type(e_map['people'], display_name='people_updated')


Complex MACDs for Intents and Training Phrases
python
Grab your Intents
my_intents = i.bulk_intent_to_df(agent_id=scratch_agent, mode='advanced')

Define your Actions
actions = pd.DataFrame(
columns=['display_name', 'phrase', 'action'],
data=[
['Default Welcome Intent', 'hi', 'delete'],
['Default Welcome Intent', 'what is up, how are you', 'add'],
['Default Welcome Intent', 'yes', 'delete'],
['support.yes', 'yes', 'add']
]
)

Modify your Training Phrases
myactions = i.modify_training_phrase_df(actions, my_intents['phrases'])

Push your Updates!
dffx.bulk_update_intents_from_dataframe(
agent_id=scratch_agent,
tp_df=myactions['updated_training_phrases_df'],
params_df=my_intents['parameters'],
update_flag=True)

1.0.3

Features
- Updated output DataFrame in `intents.bulk_intent_to_df()` to match the same schema used in the `DataframeFunctions` class for continuity
- Updated `agents.list_agents()` to optionally accept `location_id` or `project_id`. The former will provide expedited compute time and more control over the specific Region of agents that is returned. The latter is a "lazy" method and will iterate through all regions and gather any available agents into a larger List
- Added `agents.get_agent_by_display_name()` that provides the user with several options for retrieving an Agent by Display name. See docstrings for details.

Docs
- Added improved docstrings for several methods that return Long Running Operations (LROs) to alert the user to use the method `operations.get_lro()` to retrieve the status of the LRO

Tests
- Added test cases in support of `agents.get_agent_by_display_name()`

Misc.
- Updates to CI yaml
- Updates to .gitignore
- Minor lint fixes

1.0.2

Features
- Added support for `language_code` inside of `update_intent` and `bulk_update_intents_from_dataframe` methods
- Added `data/ccai_service_kit` artifacts

This set of artifacts contains an Example Dialogflow CX .blob file that can be imported directly in your project to test out various different pre-built features of Dialogflow CX.
The agent file is accompanied by an Example Cloud Functions package that serves as the backend Webhook for one of the use cases in the sample agent.

In order to use the pre-built Webhook:
1. Download the webhook artifacts folder in `data/ccai_service_kit/conf_score_cfx`
2. Choose one of the [Cloud Functions Deployment Options](https://cloud.google.com/functions/docs/deploying#deployment_options) to deploy the code to your GCP Project
3. Copy the HTTP Trigger URL from the Cloud Function in `GCP Console > Cloud Functions > Your Function Name > Trigger > Trigger URL`
4. Replace the Webhook URL in your Dialogflow CX Agent with your new Trigger URL by browsing to your Agent and going to `Manage > Webhooks > Your Webhook > Webhook URL`

1.0.1

Bug Fixes
- Fixed an issue in `bulk_create_intent_from_dataframe` where the `meta` object was being checked for `basic` mode even though the `meta` object is not needed

Features
- Added basic bot building examples for Jupyter notebooks and Python that show how to build a Dialogflow CX agent from scratch using simple text inputs and a CSV file.
- added bot_building_101.ipynb
- added bot_building_101.py

Page 7 of 7

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.