Trying to understand your use case more, but if you already have a corpus of example code in JS and in Python, why the need to use the model to do the transformation?
Or do I have to wait for GPT-4 expanded contexts to fine-tune with prompts like:
Python: Python code (4-8k tokens)
----
JS: JS code (4-8k tokens)It should be possible to build your own model to do this instead of GPT-4 if you are so inclined. I don't know how the quality would compare but there are various specialized code-specific models already around (and more coming) that work quite well.
BigCode from HuggingFace will be coming soon too.
[1] https://huggingface.co/Salesforce and expand "models" codegen-mono is Python, codegen-multi is multi language I think.