Releases: GoogleCloudPlatform/dfcx-scrapi
v1.11.0
New Features
Agent Builder SDK is here! 🎉
The long awaited Agent Builder SDK is now live in SCRAPI, so you can now build your Agents, Tools, and Examples directly from code without interacting with the UI.
In just a few lines of code, you can have an Agent up and running!
from dfcx_scrapi.core.agents import Agents
from dfcx_scrapi.core.playbooks import Playbooks
a = Agents()
agent = a.create_agent(
project_id="my-project",
display_name="SCRAPI PLAYBOOKS",
gcp_region="us-east1",
playbook_agent=True
)
p = Playbooks(agent.name)
playbooks_map = p.get_playbooks_map(agent.name, reverse=True)
p.update_playbook(
playbooks_map["Default Generative Agent"],
goal="You are a friendly Tesla service center agent.\nYour job is to help users book appointments and answer any questions they have.",
instructions=["Greet the user.", "Answer any questions the have to the best of your ability."]
)
We've released a GenAI Agents 101 Notebook to help you get started with using the new API endpoints.
As usual, please file bugs/FRs as you see them!
Enhancements
- New Vertex AI Conversation evaluation notebook added for evaluating your Vertex RAG setups
- New Vertex Search notebook added for quickly building and testing your Vertex Data Stores
- Added a new flag in
Sessions.detect_intent
to enable data store connection signals
Bug Fix
- Fixed a bug in FulfillmentBuilder that was causing bool values not to be accepted
- Pinned linter.yml file and requirements to specific pylint version
What's Changed
- Bool flag to Sessions.detect_intent to enbale data store connection signals by @Mrpatekful in #177
- Feature/test cases util by @jkshj21 in #164
- feat: Vertex Search config and example notebook by @kmaphoenix in #180
- feat: Add 1-click buttons to colabs by @kmaphoenix in #181
- Vertex AI Conversation automatic evaluation tooling by @Mrpatekful in #183
- Update linter.yml with certain pylint version by @totemws in #191
- Create README.md by @totemws in #189
- Bug/fulfillment builder param preset bug by @MRyderOC in #188
- Feature/generative playbooks by @kmaphoenix in #198
- feat: add simply playbook agent creation; update tests by @kmaphoenix in #199
- fix: tools imports now that rollout is complete by @kmaphoenix in #200
- Fix/update playbook mask by @kmaphoenix in #201
- Feat/simple tool creation by @kmaphoenix in #202
- feat: add sample genai_agent notebook and tool by @kmaphoenix in #203
New Contributors
Full Changelog: 1.10.5...1.11.0
v1.10.5
What's Changed
- Fixed duplicated detect intent call if parameters are provided. by @Mrpatekful in #175
- BUGFIX: Set Region When ID is Missing by @kmaphoenix in #176
New Contributors
- @Mrpatekful made their first contribution in #175
Full Changelog: 1.10.4...1.10.5
v1.10.4
What's Changed
Full Changelog: 1.10.3...1.10.4
v1.10.3
v1.10.2
What's Changed
- Fix/data store endpoints by @kmaphoenix in #172
- Feature/get test cases map by @jkshj21 in #159
Full Changelog: 1.10.1...1.10.2
v1.10.1
What's Changed
- fix:_check_proto_obj_attr_exist does not handle None properly by @gyar-denim in #166
- chore: bump requirements by @kmaphoenix in #170
New Contributors
- @gyar-denim made their first contribution in #166
Full Changelog: 1.10.0...1.10.1
v1.10.0
New Features
Vertex AI Search and Conversation Engines and Data Stores!😍🚒💿
SUPER excited to finally add support for programmatic creation of Engines and Data Stores for Vertex AI Search and Conversation!
This was a big collaboration between several teams including Vertex Applied AI Incubator, Vertex Search, Dialogflow and DevRel to get alignment and access to the proper API endpoints for making this happen!
In just a few lines of code, you can now create a fully working Engine/Data Store!
from dfcx_scrapi.core.data_stores import DataStores
from dfcx_scrapi.core.engines import Engines
from dfcx_scrapi.core.sites import Sites
PROJECT_ID = "PROJECT_ID"
CREDS_PATH = "YOUR_CREDS_PATH
ds = DataStores(project_id=PROJECT_ID)
ds.create_datastore("my-cool-website-datastore")
ds_map = ds.get_data_stores_map(reverse=True)
my_ds = ds_map["my-cool-website-datastore"]
sites = Sites(project_id=PROJECT_ID)
sites.create_site(data_store_id=my_ds, uri_pattern="www.example.com/blog/*", include_site=True)
sites.create_site(data_store_id=my_ds, uri_pattern="www.example.com/news", include_site=False)
eng = Engines(PROJECT_ID, creds_path=CREDS_PATH)
eng_proto = eng.build_chat_engine_proto(
display_name="my-cool-website-engine", business_name="Google Example", data_store_ids=my_ds)
eng.create_engine(eng_proto)
In addition to Engine and Data Store creation, we provide many other quality of life management endpoints like:
- Enable / Disable Advanced Site Search
- Recrawl URIs
- Check Indexing Status
- Check Verification Status
- ...and much more!
Generators ♺🏗️
Excited to finally add full programmatic support for Dialogflow CX Generators!
You can now create, list, get, delete and update Generators and prompts directly from SCRAPI!
Fun Fact: 99% of this class was written by Gemini! ✨🤩😮
Generative Fallback 🍂🔙
Full support for modifying and creating Generative Fallback prompts and templates now available in SCRAPI!
Data Store Prompt Settings ⚙️
You can now programmatically modify the Generative AI Settings for Data Store prompts!
This includes modifying the Business Name, Agent Name, Agent Scope, and other settings.
Enhancements
- Added option in
restore_agent
to allow for Fallback Settings to be set when importing an Agent - Added
delete_transition_route_group
- Added
force
arg fordelete_entity_type
to ensure the Entity Type is deleted even if it is referenced - Added Generative Settings builder class
- Added support for Generative Settings in Agent builder class
- Added support for
Start Page
(i.e. Flow Object) in theNluUtils
class that allows users to run similarity comparison on Flow Object intents - Added support for Agent Level Route Groups
Bug Fix
- Fixed a bug with
delete_entity_type
where passing theobj
arg would not delete the Entity Type - Fixed several bugs in
examples/google_sheets_series/cx_to_sheets_by_flow.ipynb
that were using outdated code refs
What's Changed
- Feature/agent restore option by @jkshj21 in #152
- Feature/delete route group by @MRyderOC in #151
- Add new Generators Feature by @kmaphoenix in #155
- Bug/google sheets series by @jkshj21 in #154
- Generative Settings Builders and Supporting Agent Methods by @kmaphoenix in #156
- Add full support for Data Stores by @kmaphoenix in #158
- Feature/load start page intents by @hjosiah in #147
New Contributors
- @jkshj21 made their first contribution in #152
- @hjosiah made their first contribution in #147
- Gemini made their first contribution in #155
Full Changelog: 1.9.0...1.10.0
v1.9.0
New Features
Vertex AI Conversation Eval Tool 📝 🔍
This iquality eval framework and tool supports the newly released Vertex AI Search & Conversation features.
You can use the new sample notebooks to:
- Build an Eval Dataset
- Run your Evals against your Vertex AI Conversational Agent
- Rate your Agent responses
- Visualize the distribution for your Ratings
Bug Fix
- Added ENUM choice for
match_type
What's Changed
- Add Evaluation Tool for generative conversations by @ADiegoCAlonso in #144
- feat: add new match_type for LLM by @kmaphoenix in #146
New Contributors
- @ADiegoCAlonso made their first contribution in #144
Full Changelog: 1.8.1...1.9.0
v1.8.1
v1.8.0
New Features
Offline Agent Parsing 📵
We're excited to announce a new feature we're calling "Offline Agent Parsing"!
So what does it do? 🤔
TLDR
The Offline Agent Parsing feature pulls your entire agent file offline and returns a Python object ✨jam packed ✨ with all of the key Agent Resources and most commonly sought after bits of information from your agent.
It's Fast! ⚡️
We can process any agent size, from 1 Flow to 100 Flows, in blazing fast time! 🔥
It's Cheap! (On the API!) 💰
We make all the magic happen in just 2 API calls, no matter the agent size! 🪄
It's Convenient! 🙏🏼
We already know you need that map and DataFrame. We gotcha! 😎
Some examples of what you'll get when you use the feature:
- All of the major agent resources in List format (i.e. Intents, Entity Types, Flows, Pages, etc.)
- All of the common resource maps (i.e. intents_map, flows_map, pages_map, etc.)
- A full graph representation of your agent, for additional downstream parsing
- Handy DataFrames for identifying gaps in your agent design
- Total Counts of all common resources (i.e. Total Intents, Total Training Phrases, etc.)
- ...and much more!
For a detail output of available, see the AgentData class.
Motivation
The motivation behind this class comes from many of our customers that are building really, REALLY big Dialogflow CX agents!
Using the standard APIs can become a costly hinderance in terms of time it takes to retrieve the online data from your Agent.
If you have 50 Flows and you want to get all of the Pages in your agent, that's a minimum of 51 API calls!
Additionally, you have to beware of API Quota limits.
Run your script too fast, and you'll hit a 429 Quota Exhausted error!
With Offline Agent Parsing, we take all of the heavy lifting offline and we do it all with just a single API call.
Batch NLU Evaluation 📊
Another great feature that we're releasing is the NLU Evaluation framework!
This framework allows you to batch / bulk test your Dialogflow CX NLU model against your evaluation datasets.
This is especially helpful for teams that do a lot of NLU tuning in Dialogflow CX.
See the new Sample Eval Notebook for some pointers on getting started!
Bug Fixes
- Fixed a bug where
location_id
was reverted tolocation
inagents.py
Misc
- Fixed some docs in various places
- Fixed pylint deprecation error for builtins
- Added optimization for
__convert_tr_target_page
inCopyUtil
What's Changed
- Misc/improvement by @MRyderOC in #137
- fix: revert change to location_id arg by @kmaphoenix in #139
- Feature/agent checking by @SeanScripts in #104
- Feat/nlu evals by @kmaphoenix in #143
Full Changelog: 1.7.0...1.8.0