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

README example outputs Python literal, not JSON #238

Open
esnible opened this issue Dec 19, 2024 · 0 comments
Open

README example outputs Python literal, not JSON #238

esnible opened this issue Dec 19, 2024 · 0 comments
Labels
bug Something isn't working docs

Comments

@esnible
Copy link
Member

esnible commented Dec 19, 2024

Describe the bug
README.md includes a Code Examples / Variable Definition & Template Usage that concludes with the block

- model: watsonx/ibm/granite-34b-code-instruct
  input: |
    Process this input: ${USER_INPUT}
    Format the output as JSON.

Although the LLM is asked to format the output as JSON, the LLM formats the output as a Python literal (single quotes instead of double quotes).

To Reproduce
Copy the sample into a file vardef.pdl, run pdl vardef.pdl

Expected behavior
It isn't clear to me what the output should be. Should it output the user input YAML as JSON? Should it pretend it is a Python interpreter and output something? Whatever it is doing, the output isn't JSON, which means this is a bad example for top-level README.

Screenshots

pdl vardef.pdl                                        

{'output': {'source_code': '@ Suppre...eamsets/datacollector', 'repo': 'streamsets/datacollector', 'path': 'stagesupport/src/main/java/com/.../OffsetUtil.java', 'function_name': 'OffsetUtil.deserializeOffsetMap'}}

Desktop (please complete the following information):

  • OS: MacOS
  • Version PDL 0.1.1.dev9+g912b231.d20241218; Python 3.13.1
@esnible esnible added bug Something isn't working docs labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docs
Projects
None yet
Development

No branches or pull requests

1 participant