Skip to content

Fix Exa blocks handling of empty results #10005

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

Closed

Conversation

Swiftyos
Copy link
Contributor

Summary

  • ensure Exa search/contents/similar blocks return an error when API results are empty

Testing

  • ruff check --fix autogpt_platform/backend/backend/blocks/exa/search.py autogpt_platform/backend/backend/blocks/exa/similar.py autogpt_platform/backend/backend/blocks/exa/contents.py
  • black autogpt_platform/backend/backend/blocks/exa/search.py autogpt_platform/backend/backend/blocks/exa/similar.py autogpt_platform/backend/backend/blocks/exa/contents.py
  • isort autogpt_platform/backend/backend/blocks/exa/search.py autogpt_platform/backend/backend/blocks/exa/similar.py autogpt_platform/backend/backend/blocks/exa/contents.py

@Swiftyos Swiftyos requested a review from a team as a code owner May 22, 2025 14:42
@Swiftyos Swiftyos requested review from kcze and majdyz and removed request for a team May 22, 2025 14:42
@github-project-automation github-project-automation bot moved this to 🆕 Needs initial review in AutoGPT development kanban May 22, 2025
Copy link

netlify bot commented May 22, 2025

Deploy Preview for auto-gpt-docs-dev canceled.

Name Link
🔨 Latest commit 409d327
🔍 Latest deploy log https://app.netlify.com/projects/auto-gpt-docs-dev/deploys/682f37e343c5e30008fac464

Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Error Message

The error message "results are empty" is not very descriptive. Consider providing a more informative message that explains why empty results occurred or what the user should do next.

    yield "error", "results are empty"
else:

Copy link

netlify bot commented May 22, 2025

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 409d327
🔍 Latest deploy log https://app.netlify.com/projects/auto-gpt-docs/deploys/682f37e36921630009161f8e

Copy link

deepsource-io bot commented May 22, 2025

Here's the code health analysis summary for commits 8f1b3eb..409d327. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ SuccessView Check ↗
DeepSource Python LogoPython✅ Success
❗ 3 occurences introduced
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Copy link
Member

@Pwuts Pwuts left a comment

Choose a reason for hiding this comment

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

This doesn't fix error cases. I have a better fix for this :)

@Pwuts
Copy link
Member

Pwuts commented May 24, 2025

#10020

@Pwuts Pwuts closed this May 24, 2025
@github-project-automation github-project-automation bot moved this from 🆕 Needs initial review to ✅ Done in AutoGPT development kanban May 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants