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

"list index out of range" when trying to hit an API. #772

Open
harshitGC opened this issue Jun 7, 2024 · 3 comments
Open

"list index out of range" when trying to hit an API. #772

harshitGC opened this issue Jun 7, 2024 · 3 comments

Comments

@harshitGC
Copy link

The bot is encountering an error ("list index out of range") when attempting actions that require querying an external API.

I added an action to search for a product on a ecommerce site. There's a discrepancy in the configuration of an action. After specifying a JSON schema for the request body and saving it, the schema reverts back to the default state (i.e., "{}") upon reopening the action details. It doesn't save the schema details. Although, the name, description and headers were being saved.

Sometimes the copilot will ask further details about the product and on specifying that there will be no response from it.

The expected format for the request body includes a JSON object with a "q" key representing the product query.

The API responds with a JSON object containing an array of "products," each representing a product found based on the query. Each hit product details such as "product_id", "product_name", product_thumbnail", etc.

Along with "hits" it also return the query which was sent as response and total_products (number of products that are found based of the query).

image

Unable to search.

image

Not repliying.

image

Not hitting API in the backend.

  • OS: Windows 11
  • Browser: Chrome Version 125.0.6422.142
@BLRAJS
Copy link

BLRAJS commented Jun 9, 2024

I'm having the same issue

Can anyone provide insights on why the JSON schema is not being saved correctly?
Are there any known issues or fixes related to this behavior?
Any suggestions on how to debug or resolve the "list index out of range" error in this context?
Uploading image.png…

OS: Windows 11

@Gloria1011
Copy link

I'm facing the same issue and am unsure of the cause. Does anyone have a solution for this?

@dwikyrestu
Copy link

Same, does anybody know how to solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants