Add tabletojson dependency and implement HTMLTablesToJSON function #672
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.
The codebase has seen a big change where a functionality to convert HTML tables to JSON is implemented. πποΈ
tabletojson
library that is added inpackages/core/package.json
.HTMLTablesToJSON
doing the conversion is added intohtml.ts
.html.test.ts
.HTML
object inglobals.ts
.prompt_template.d.ts
.There are modifications around tracing and debugging, which improves coverage and quality of logs. ππ
promptrunner.ts
, the model is now part of the heading used in tracing.The way the data is defined and stored is changed.
createDefDataNode
is renamed tocreateDefData
inpromptdom.ts
andrunpromptcontext.ts
.A minor change is made to the sample code in
browse-text.genai.mts
. Now, the code converts an HTML table to JSON using the newly implemented converter and removes the first column from the result before defining "DATA".A part of the code where verbose logs are made is removed reducing noise in the output. This happens in
playwright.ts
where certain log statements are removed providing a cleaner output for users. ποΈ π―Minor formatting and typo corrections are carried out, for better code readability and understanding. ππ€
Note that import lines and added comments are ignored as per the task instruction.