Enhanced prompt service logs to include the prompt / document which caused the issue
Minor TODO comments added in code
Refactored _fetch_response() to run with a single prompt instance instead of a list
Why
Prompt studio errors don't have enough context while running multiple docs / prompts
Existing function to fetch response unnecessarily accepts a list - this refactor was needed to specify the prompt that causes an error
How
-
Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
No, no DB migrations involved and the main changes are on log messages. Other code changes is just refactor on an existing function
Notes on Testing
Simulated an error from prompt service to check locally
Screenshots
Checklist
I have read and understood the [Contribution Guidelines]().
What
_fetch_response()
to run with a single prompt instance instead of a listWhy
Prompt studio errors don't have enough context while running multiple docs / prompts![image](https://github.com/Zipstack/unstract/assets/117059509/f9d805b1-da4d-4672-8b12-5231d798a4ee)
Existing function to fetch response unnecessarily accepts a list - this refactor was needed to specify the prompt that causes an error
How
-
Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
Notes on Testing
Screenshots
Checklist
I have read and understood the [Contribution Guidelines]().