From 0822934415d80bc3d0ef7822f83d570b1424e260 Mon Sep 17 00:00:00 2001 From: Patrick Marlow Date: Tue, 29 Oct 2024 10:57:03 -0500 Subject: [PATCH] fix: add constructor input for lang_code --- src/dfcx_scrapi/core/agents.py | 3 +++ src/dfcx_scrapi/core/intents.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/dfcx_scrapi/core/agents.py b/src/dfcx_scrapi/core/agents.py index b9030aed..5ce3e057 100644 --- a/src/dfcx_scrapi/core/agents.py +++ b/src/dfcx_scrapi/core/agents.py @@ -41,6 +41,7 @@ def __init__( creds=None, scope=False, agent_id: str = None, + language_code: str = "en" ): super().__init__( creds_path=creds_path, @@ -53,6 +54,8 @@ def __init__( self.agent_id = agent_id self.client_options = self._set_region(agent_id) + self.langauge_code = language_code + @scrapi_base.api_call_counter_decorator def _list_agents_client_request(self, location_id) -> List[ types.agent.Agent diff --git a/src/dfcx_scrapi/core/intents.py b/src/dfcx_scrapi/core/intents.py index de1b0cf7..ef0d4a70 100644 --- a/src/dfcx_scrapi/core/intents.py +++ b/src/dfcx_scrapi/core/intents.py @@ -44,6 +44,7 @@ def __init__( scope=False, intent_id: str = None, agent_id: str = None, + language_code: str = "en" ): super().__init__( creds_path=creds_path, @@ -59,6 +60,8 @@ def __init__( if agent_id: self.agent_id = agent_id + self.language_code = language_code + @staticmethod def concat_dict_and_df( intent_df: pd.DataFrame,