本程序使用大语言模型帮助翻译 IOI 题目。
git clone https://github.com/hanwentao/ioitrans.git
cd ioitrans
cp config.example.toml config.toml
# Edit config.toml accordingly
uv run main.py <task-name>程序支持通过配置文件或命令行参数指定 Ollama 服务地址。
在 config.toml 文件中添加以下配置项:
# Ollama 服务地址,默认为 localhost:11434
ollama_host = "localhost:11434"如果 Ollama 服务运行在其他地址,可以修改此配置项以指向正确的地址。
也可以通过命令行参数 --ollama-host 指定 Ollama 服务地址:
uv run main.py --ollama-host your-ollama-server:11434 <task-name>程序支持通过配置文件指定 Ollama 服务地址。默认情况下,程序连接到本地的 localhost:11434。
在 config.toml 文件中添加以下配置项:
# Ollama 服务地址,默认为 localhost:11434
ollama_host = "localhost:11434"如果 Ollama 服务运行在其他地址,可以修改此配置项以指向正确的地址。