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

Allow values that are not dictionaries in the request params in the /search endpoint #2720

Merged
merged 2 commits into from
Jul 15, 2022

Conversation

masci
Copy link
Contributor

@masci masci commented Jun 23, 2022

Related Issue(s): fixes #2656
The code processing requests to the /search endpoint assumes all the items in the params dictionary are also dictionaries, which is wrong. For example, users might want to pass debug: True to the endpoint.

Proposed changes:

  • Ensure the item in params is a dictionary before accessing its keys.

Pre-flight checklist

Copy link
Member

@julian-risch julian-risch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@masci masci mentioned this pull request Jun 27, 2022
4 tasks
@masci masci merged commit 632cd1c into master Jul 15, 2022
@masci masci deleted the massi/api-params branch July 15, 2022 11:24
Krak91 pushed a commit to Krak91/haystack that referenced this pull request Jul 26, 2022
…/search` endpoint (deepset-ai#2720)

* let params contain something else than dictionaries

* rewrite the test same style as the main branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't set "debug" mode on query pipeline
2 participants