-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: added new trace types for Response step (PL3-54) #446
base: master
Are you sure you want to change the base?
Conversation
be23e96
to
ed332f4
Compare
style?: { | ||
delay?: number; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the idea to move this out of the text
trace's payload
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct. The new JSON variant seems to also have a sort of delay property, based on the Figma mocks.
591a9f6
to
6c50516
Compare
8bf6576
to
c772d1f
Compare
c772d1f
to
0baae44
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information The version of Java (11.0.3) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
import { BaseTraceFrame, TraceType } from '../../node/utils'; | ||
|
||
interface StepData { | ||
content: Markup; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The data payload is subject to change due to a proposal by Tyler H to simply return Markdown rather than Markup. See slack thread here.
Fixes or implements PL3-54
Brief description. What is this change?
Added a new family of V3 traces to support the Response handler.
Implementation details. How do you make this change?
Adding new trace types to support new kinds of content in V3:
JSONTrace
- Stores JSON contentVideoTrace
- Stores Video contentAdded new versions of existing traces to simplify the trace
ImageTrace
- Stores an image url without the additional properties from aVisualTrace
. The v3 Response handler does not have sufficient data to fill out aVisualTrace
. ThisImageTrace
is a simpler trace that avoids a situation where the Response handler returns aVisualTrace
with extraneous, useless properties with dummy values.TextTrace
- Stores text asMarkup
output. This replaces the V2 text trace, as the original text trace does not returnMarkup
but instead, astring
message along with Slate.js data. We should instead return aMarkup
data structure and leave it up to the user to translate Markup formatting (e.g. bolding) into a client-specific format (e.g.**
in markdown).DebugTrace
- Refactors the debug trace to be more flexible. Highlights include a log-level property,DebugInfoLevel
, to support a future feature where users can filter out for certain debug traces fromgeneral-runtime
similar to different log levels in JS console logging and a newdetails
payload that could store any data. In particular, I've used this in the Prompt variants to output debug traces containing the documents used by the knowledge base to generate its answer.The new trace types are nested under
traces/v3
notnode
. Ideally, in the future, traces are not coupled 1-to-1 withnode
. Thetrace
s should be a related, but essentially independent data type from thenode
s and thegeneral-runtime
can be thought of as an "adapter" that adapts input nodes into output traces.NOTE: This PR was originally submitted for review but has been resubmitted because it has undergone refactors as a result of the response handler changes.
Setup information
N/A
Deployment Notes
N/A
Related PRs
Checklist