We have following microservice workflow automation config: [code] Is there a better way…
Private research annotation
Sign in to add a private research label or note.
- 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
Another potential improvement to the configuration would be to use a more efficient way of determining the range of pages to process. Currently, it looks like the
scrape-providerstep is called repeatedly, and each time it is called, it determines whether there is a next page to process by checking theoutput.hasNextPageproperty. This can be inefficient, as it means that the step must be called once for each page to determine the range of pages to process.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.