![]() The Tools folder contains various customized toolkits that allow you to do more complex bot management tasks, such as These classes and methods can be used to build higher level methods or custom tools and applications.This folder contains the high level building blocks of SCRAPI. ![]() The Core folder is synonymous with the core Resource types in the DFCX Agents (agents, intents, flows, etc.) Here is a brief overview of the SCRAPI library's structure and the motivation behind that structure. Assign your Service Account to a local variableįrom dfcx_ import Intents creds_path = '' agent_path = '' # DFCX Agent ID paths are in this format: # 'projects//locations//agents/' # Instantiate your class object and pass in your credentials i = Intents ( creds_path, agent_id = agent_path ) # Retrieve all Intents and Training Phrases from an Agent and push to a Pandas DataFrame df = i.To run a simple bit of code you can do the following: Set up Google Cloud Platform credentials and install dependencies. ![]() dataframe_to_sheets ( 'GOOGLE_SHEET_NAME', 'TAB_NAME', df ) Getting Started Environment Setup You can then use SCRAPI simply like this: from dfcx_ import Intents agent_id = '' i = Intents () # ' i = Intents () # ' creds_path = '' i = Intents ( creds_path = creds_path ) dffx = DataframeFunctions ( creds_path = creds_path ) df = i. If you're using SCRAPI with a Google Colab notebook, you can add the following to the top of your notebook for easy authentication: project_id = '' # this will launch an interactive prompt that allows you to auth with GCP in a browser ! gcloud auth application - default login - no - launch - browser # this will set your active project to the `project_id` above ! gcloud auth application - default set - quota - project $ project_idĪfter running the above, Colab will pick up your credentials from the environment and pass them to SCRAPI directly.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |