konveyor / kai

Konveyor AI - static code analysis driven migration to new targets via Generative AI
Apache License 2.0
23 stars 28 forks source link

🐛 Address URL encoding for source code sent to LLM #317

Closed SaxenaAnushka102 closed 2 weeks ago

SaxenaAnushka102 commented 3 weeks ago

Addresses #213 by applying the | urlencode filter to the src_file_contents variable in main.jinja.

Testing:

Ran example/run_demo.py with the modified main.jinja file to verify that the LLM is receiving the source code correctly and processing it as expected.

Signed-off-by: Anushka Saxena anushkasaxena.1947@gmail.com

jwmatthews commented 2 weeks ago

@SaxenaAnushka102 I apologize that I made a mistake with order of merging a few PRs and this fix got included via #318.

I had been working on a client in #318, as I tested that I found a few other locations we needed to adjust the encoding. I addressed what I saw during that PR's testing and forgot you had this PR open with the 1-line fix. In hindsight I would have merged your PR first, I am sorry.

Thank you for your contribution and I apologize on the confusion with not merging your fix first.