We have following microservice workflow automation config: [code] Is there a better way…
- User
We have following microservice workflow automation config:
code"get-providers-to-fetch": { type: "api", params: { method: "GET", url: "https://immo.so/api/providers", query: { all: "${input.all}", }, async: false, }, next: [ { name: "scrape-provider", forEach: true, params: {}, }, ], }, "scrape-provider": { type: "api", params: { method: "GET", url: "https://immo.so/api/scrape", query: { provider: "${input.provider}", endpoint: "${input.endpoint}", page: "${input.page}", batchSize: "${input.batchSize}", }, async: false, }, next: [ { name: "scrape-provider", if: "${output.hasNextPage} === true", params: { provider: "${input.provider}", endpoint: "${input.endpoint}", page: "${input.page}", batchSize: "${input.batchSize}", // only param changes is pagination from from: "${output.from}", }, }, ], },Is there a better way to recursively run pagination on scrape-provider? How would you change the config
- Assistant
- User
contine the message where you stopped
- Assistant
Sure, I'll continue from where I left off.
Additional Considerations:
-
Error Handling: Make sure to handle errors properly within the
scrape-providerstep. If an error occurs, you might want to stop the loop or implement a retry mechanism.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.