An experimental library for translating source code to different programming languages using a local Open WebUI instance.
- Rust installed on your system
- Open WebUI running locally (open-webui.github.io)
- An Open WebUI API key (generated from your instance settings)
cargo add aleph_openwebuicargo run --example basic <source_file_path> <target_language>cargo run --example basic test/dataset/syracuse.ml javalet result = aleph_openwebui::translate_code_from_string("fn add(a, b) { a + b }", "Python");| Variable | Default | Description |
|---|---|---|
OPENWEBUI_API_KEY |
(required) | Your Open WebUI API key |
OPENWEBUI_MODEL |
llama3.3 |
Model to use (must be available in your instance) |
OPENWEBUI_URL |
http://localhost:3000/api/chat/completions |
Open WebUI endpoint |
- Translation quality depends on the model used
- Some language-specific concepts may not have direct equivalents in the target language
- The tool is experimental and may require manual adjustments of generated code
Contributions are welcome! Feel free to open an issue or submit a pull request.