Skip to content

Paper2code for Windows#29

Open
VasileiosMalt wants to merge 2 commits intogoing-doer:masterfrom
VasileiosMalt:master
Open

Paper2code for Windows#29
VasileiosMalt wants to merge 2 commits intogoing-doer:masterfrom
VasileiosMalt:master

Conversation

@VasileiosMalt
Copy link
Copy Markdown

Attention: If merged, I recommend a different branch, as I have made multiple changes.

What I added:

  1. Multi-provider LLM support (new providers.py module)

Replaced hardcoded from openai import OpenAI with a new providers module across all pipeline scripts

Added build_client(), chat_complete(), and add_provider_args() helpers so you can pass --provider and --api_key as CLI arguments instead of relying only on OPENAI_API_KEY env var

API responses are now returned as normalized dicts instead of OpenAI SDK objects

  1. Windows / PowerShell support

3.1_coding_sh.py: Changed the LLM prompt from generating a Bash script to generating a PowerShell .ps1 script for Windows

Output filename changed from reproduce.sh → reproduce.ps1

File path handling updated to use os.path.join() with backslash support instead of hardcoded forward-slash string formatting

  1. UTF-8 encoding on all file I/O

Added encoding='utf-8' to every open() call across all pipeline scripts — fixes encoding errors that occur on Windows where the default encoding is often not UTF-8

  1. Windows-safe file naming

File names containing / (subdirectory paths) are flattened with _ replacements before saving, avoiding path errors on Windows

Note: So far tested only openrouter (and worked perfectly)

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.

1 participant