From 5618072375a04e0067902fe1c41be096d4db6f98 Mon Sep 17 00:00:00 2001 From: Aarushi <50577581+aarushik93@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:35:14 +0000 Subject: [PATCH] fix(blocks/Exa): Fix exa contents block advanced toggle (#9255) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Toggling the advanced option on Exa Contents Block isn't working. It throws a frontend error. ### Changes 🏗️ Remove Optional from ContentRetrievalSettings in exa/contents.py ### Checklist 📋 #### For code changes: - [x ] I have clearly listed my changes in the PR description - [ x] I have made a test plan - [ x] I have tested my changes according to the test plan: - Add an ExaContentsBlock - Hit advanced #### For configuration changes: N/A --- autogpt_platform/backend/backend/blocks/exa/contents.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autogpt_platform/backend/backend/blocks/exa/contents.py b/autogpt_platform/backend/backend/blocks/exa/contents.py index 5317f56e31..fa1e0831d1 100644 --- a/autogpt_platform/backend/backend/blocks/exa/contents.py +++ b/autogpt_platform/backend/backend/blocks/exa/contents.py @@ -13,12 +13,12 @@ from backend.util.request import requests class ContentRetrievalSettings(BaseModel): - text: Optional[dict] = SchemaField( + text: dict = SchemaField( description="Text content settings", default={"maxCharacters": 1000, "includeHtmlTags": False}, advanced=True, ) - highlights: Optional[dict] = SchemaField( + highlights: dict = SchemaField( description="Highlight settings", default={ "numSentences": 3, @@ -27,7 +27,7 @@ class ContentRetrievalSettings(BaseModel): }, advanced=True, ) - summary: Optional[dict] = SchemaField( + summary: dict = SchemaField( description="Summary settings", default={"query": ""}, advanced=True,