Skip to content
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

fix missing CSV object #560

Merged
merged 3 commits into from
Jun 21, 2024
Merged

fix missing CSV object #560

merged 3 commits into from
Jun 21, 2024

Conversation

pelikhan
Copy link
Member

@pelikhan pelikhan commented Jun 21, 2024

generated by pr-describe

  • Introduced new CSV parsing functionality with associated tests. It includes parsing CSV data from a string and also directly from a file, with parsing options support. 🚀
  • Integrated CSV-related methods into the CSV class in JavaScript. 🧮
  • Enhanced documentation with detailed explanations and examples of CSV parsing and stringifying. 📘
  • Added a CSV file sample (penguins.csv) for testing purposes. 🐧
  • Minor modifications were made to the definition of related fields and scripts. 🔧
  • Changes were user-facing as they are reflected in 'packages/core/src/prompt_template.d.ts' and 'packages/core/src/prompt_type.ts'. 🖥️
  • Please note, edits were made across documentations, type definitions, and sample scripts. 📝

Copy link

LGTM 🚀

The pull request only adds a declaration for the CSV var which is used for CSV parsing and stringifying. No functional issues detected.

generated by pr-review

Parsing and stringifying of CSV data.
Parsing and stringifying of Comma Separated Values (CSV) data.

The parsers map CSV data to an array of object with field names mapping the header. For example, the CSV data:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The introduction to parsing and stringifying CSV data has been expanded to provide a clearer example.

generated by pr-docs-review-commit content_update


You can use [defData](/genaiscript/reference/scripts/context)
to serialize the `rows` object to the prompt. `defData` also supports
basic row filtering options like with `def`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Information on using defData to serialize objects to the prompt has been added, along with a note on its similarity to def in terms of row filtering.

generated by pr-docs-review-commit content_addition

@pelikhan pelikhan merged commit 2398e87 into main Jun 21, 2024
9 checks passed
@pelikhan pelikhan deleted the csv-docs branch June 21, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant