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

Multiline vars replacement break indentation in config generation #759

Open
yleflour opened this issue May 2, 2024 · 0 comments
Open

Multiline vars replacement break indentation in config generation #759

yleflour opened this issue May 2, 2024 · 0 comments

Comments

@yleflour
Copy link

yleflour commented May 2, 2024

Current situation

If the promptfile contains this:

- role: user
  content: |
    The file content is:
    ```
    {{fileContent}}
    ```

And the configfile contains this:

tests:
  - vars:
      fileContent: |
        // Sample comment
        export const hello = "word"

The resulting output is:

- role: user
  content: |
    The file content is:
    ```
    // Sample comment
export const hello = "word"
\```

Which is invalid

Expect result

A multiline var value should be indented as well:

- role: user
  content: |
    The file content is:
    ```
    // Sample comment
    export const hello = "word"
    ```
@yleflour yleflour changed the title Multiline vars are badly replaced Multiline vars replacement break indentation May 6, 2024
@yleflour yleflour changed the title Multiline vars replacement break indentation Multiline vars replacement break indentation in config generation May 6, 2024
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

No branches or pull requests

1 participant