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

Parsers can now return any number of fields, and can access the whole item #81

Merged
merged 3 commits into from
Oct 8, 2024

Conversation

redhog
Copy link
Collaborator

@redhog redhog commented Oct 7, 2024

Closes #72

This should be backwards compatible with existing yaml. It also supports the following extended yaml format:

datasets:
  name:
    type: file
    source: local
    path: "file.json"
    parsing:
      - function: function_name
        param_name1: value1
        param_name2: value2
        ...
        param_nameN: valueN

input_key and output_key are supported for all previously existing parsers (and are just normal parameters to them), but might not be supported by any particular new parser. In fact, the llama-index based ones do not support an output_key, but instead places the output in the two fields text and metadata.

For the existing functions that do take input_key and output_key, they are both optional and both have default value "text".

@shreyashankar shreyashankar changed the base branch from main to staging October 8, 2024 04:14
@shreyashankar shreyashankar merged commit 79ce6aa into ucbepic:staging Oct 8, 2024
1 of 4 checks passed
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.

Parsers / loaders are a bit limited
2 participants