make defOutputProcessor more flexible #634
Merged
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.
A change in the way errors are logged was made in
packages/core/src/trace.ts
file 💼renderError
function now always details errors, a change from the previous value of false.message
&emsg
as a single string separated by a comma, unlike previously, it was one or the other.Adjustments were implemented in
packages/core/src/types/prompt_template.d.ts
🧾PromptOutputProcessorHandler
type to bevoid
orPromise<void>
. This is potentially user-facing as it alters the public API.A substantial change was made to
packages/sample/genaisrc/output.genai.js
🔄model
field and updated thefiles
andtests
fields.defOutputProcessor
function to be async.defOutputProcessor
function block that logs out a text.By the look of it, the main objective of these changes appears to be the enhancement of error logging and improvements in the tasks undertaken by output processors.