Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Error Agent does not support language: 'en' #245

Closed
gaizkaga opened this issue Oct 3, 2024 · 1 comment · Fixed by #251
Closed

[BUG] Error Agent does not support language: 'en' #245

gaizkaga opened this issue Oct 3, 2024 · 1 comment · Fixed by #251
Assignees
Labels
bug Something isn't working Flows Flow Resources Pages

Comments

@gaizkaga
Copy link

gaizkaga commented Oct 3, 2024

I have an agent with Spanish as the default and only language. I am trying to run an intents test but I keep getting the same error: Agent does not support language: 'en'

Sample code:
dc = DialogflowConversation(creds_path=self.creds_path, agent_id=self.agent_path, language_code = "es")
results = dc.run_intent_detection(test_set=scrapi_df)

Expected Behavior

No errors

Current Behavior

Agent does not support language: 'en'

Possible Solution

  1. flows.py -> function get_flows_map:
    • add language_code as parameter -> def get_flows_map(self, agent_id: str = None, reverse=False, language_code: str = "en")
    • add language_code to list_flows -> self.list_flows(agent_id=agent_id, language_code=language_code)
  2. pages.py -> function get_pages_map:
    • add language_code as parameter -> def get_pages_map(self, agent_id: str = None, reverse=False, language_code: str = "en")
    • add language_code to list_flows -> self.list_flows(agent_id=agent_id, language_code=language_code)
  3. conversations.py - function _page_id_mapper
    • add language_code as parameter -> self.flows.get_flows_map(agent_id=self.agent_id, language_code=self.language_code)
    • add language_code as parameter -> self.pages.get_pages_map(flow_id=flow_id, language_code=self.language_code)

Steps to Reproduce

  1. Dialogflow CX Agent with with Spanish as the default and only language.
  2. Run DialogflowConversation run_intent_detection
@gaizkaga gaizkaga added the bug Something isn't working label Oct 3, 2024
@kmaphoenix kmaphoenix self-assigned this Oct 9, 2024
@kmaphoenix kmaphoenix added Flows Flow Resources Pages labels Oct 9, 2024
@kmaphoenix kmaphoenix linked a pull request Oct 9, 2024 that will close this issue
@kmaphoenix
Copy link
Member

Fixed in #251
Please give it a try after the next release is cut.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Flows Flow Resources Pages
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants