AutoGPT
AutoGPT copied to clipboard
feat(backend): Normalize simplified JSON schema for Firecrawl extraction
Changes ποΈ
Fixes AUTOGPT-SERVER-6SR. The issue was that: FirecrawlExtractBlock passes simplified user input {"Job title": "string"} directly, failing Firecrawl API's strict JSON Schema validation.
- Added a function
normalize_to_json_schemato convert simplified schema formats into valid JSON Schema. - Modified the FirecrawlExtractBlock to use the normalized schema when calling the FirecrawlApp's extract method.
- Updated the description of the
output_schemafield to reflect the support for both simplified and full JSON Schema formats.
This fix was generated by Seer in Sentry, triggered by Toran Bruce Richards. ποΈ Run ID: 2409159
Not quite right? Click here to continue debugging with Seer.
Checklist π
For code changes:
- [x] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
- [ ] Manually tested the FirecrawlExtractBlock with both simplified and full JSON Schema formats to ensure correct schema normalization and data extraction.
Example test plan
- [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes correctly
- [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
- [ ] Edit an agent from monitor, and confirm it executes correctly
For configuration changes:
- [ ]
.env.defaultis updated or already compatible with my changes - [ ]
docker-compose.ymlis updated or already compatible with my changes - [ ] I have included a list of my configuration changes in the PR description (under Changes)
Examples of configuration changes
- Changing ports
- Adding new services that need to communicate with each other
- Secrets or environment variable changes
- New or infrastructure changes such as databases
Deploy Preview for auto-gpt-docs-dev canceled.
| Name | Link |
|---|---|
| Latest commit | 67b14cda642740c648caa680b4100fd6f1f316f3 |
| Latest deploy log | https://app.netlify.com/projects/auto-gpt-docs-dev/deploys/690a2a28ec42bb0008691371 |
Deploy Preview for auto-gpt-docs canceled.
| Name | Link |
|---|---|
| Latest commit | 67b14cda642740c648caa680b4100fd6f1f316f3 |
| Latest deploy log | https://app.netlify.com/projects/auto-gpt-docs/deploys/690a2a28c38c9300084d53d9 |
[!IMPORTANT]
Review skipped
Auto reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.
Comment @coderabbitai help to get the list of available commands and usage tips.
Here's the code health analysis summary for commits 4744675..67b14cd. View details on DeepSourceΒ β.
Analysis Summary
| Analyzer | Status | Summary | Link |
|---|---|---|---|
| β Β Success | View CheckΒ β | ||
| β Β Success | View CheckΒ β |
π‘ If youβre a repository administrator, you can configure the quality gates from the settings.
Thank you for this PR that fixes the JSON schema normalization issue in the Firecrawl extraction block!
The code changes look good, and the implementation approach makes sense. However, before we can merge this PR, please complete the checklist by checking the 'I have made a test plan' box and checking off the test step you've listed.
Also, could you confirm that you've actually performed the manual testing described in your test plan? This will help ensure the changes work as expected.