feat: add FallbackResponse class to core/processing/standard.py#414
Open
rock-n-shrimproll wants to merge 14 commits intodevfrom
Open
feat: add FallbackResponse class to core/processing/standard.py#414rock-n-shrimproll wants to merge 14 commits intodevfrom
rock-n-shrimproll wants to merge 14 commits intodevfrom
Conversation
RLKRo
reviewed
Jan 31, 2025
RLKRo
requested changes
Feb 6, 2025
RLKRo
reviewed
Mar 11, 2025
RLKRo
reviewed
Mar 13, 2025
RLKRo
reviewed
Mar 24, 2025
RLKRo
reviewed
Mar 28, 2025
RLKRo
reviewed
Mar 28, 2025
RLKRo
reviewed
Apr 17, 2025
Comment on lines
+67
to
+71
| response_exception: Optional[str] = Field(default=None, exclude=True) | ||
| """ | ||
| Stores exception messages raised from response functions wrapped in | ||
| :py:class:`~chatsky.processing.standard.AddFallbackResponses`. | ||
| """ |
Member
There was a problem hiding this comment.
I think that this is too random of a field that is unusable in many cases.
Better approach seems to be to make this field hold last exception raised from any script function and not only responses when AddFallbackResponses is used.
class BaseScriptFunction:
async def wrapped_call(ctx):
...
except Exception as exc:
ctx.framework_data.last_exception = excPreferably in a separate PR.
| "Enables complex stats collection across multiple turns." | ||
| slot_manager: SlotManager = Field(default_factory=SlotManager) | ||
| "Stores extracted slots." | ||
| response_exception: Optional[str] = Field(default=None, exclude=True) |
Member
There was a problem hiding this comment.
Do you remember why this holds repr instead of exception?
Seems like it's better to store exception since this field will not be serialized.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Please describe here what changes are made and why.
Checklist
List here tasks to complete in order to mark this PR as ready for review.
To Consider
.ignorefiles, scripts (such aslint), distribution manifest (if files are added/deleted)