Add note qc feature#155
Merged
Merged
Conversation
Signed-off-by: James Spadafora <spadjv@gmail.com>
Signed-off-by: James Spadafora <spadjv@gmail.com>
Signed-off-by: James Spadafora <spadjv@gmail.com>
Signed-off-by: James Spadafora <spadjv@gmail.com>
Signed-off-by: James Spadafora <spadjv@gmail.com>
Collaborator
|
LVGTM!!! Very neat idea James! |
Collaborator
There was a problem hiding this comment.
A few things maybe worth looking at before merge (from my AI and brushed up by me):
-
generate_with_tools and generate_structured_with_tools duplicate the tool-call loop almost verbatim — consider extracting a shared helper.
-
json.loads(tc.function.arguments or "{}") will throw on malformed JSON; consider wrapping and returning an error result to the tool channel so the model can recover.
-
If max_iterations is hit mid tool-calling in generate_structured_with_tools, you proceed to instructor extraction without a clean final assistant turn. Worth at least a log warning, ideally a forced tool_choice="none" final pass.
As an aside:
- max_iterations bounds turns but not size — if tool_executor returns large prodtracking blobs, messages grows every iteration and you can chew through context fast. Probably worth truncating tool results before appending, or tracking approximate token usage.
Signed-off-by: James Spadafora <spadjv@gmail.com>
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.
Summary
This is a heavy but cool one! This change adds a note QC workflow. It allows users to add checks to notes with natural language then these checks run on publish. For example, you can verify a note vs the transcript.
Checks can be added via the settings UI
These checks run in the publish UI. They can update the note itself or the other fields on the note.
The checks have access to tools to browse the prodtracking software. An example of where this can be used is to find attachments to plug into the note links, tos, or CCs,
Testing
How I Tested