projz_renpy_translation icon indicating copy to clipboard operation
projz_renpy_translation copied to clipboard

指令行模式支持openAI API

Open DDXDB opened this issue 1 year ago • 3 comments

能否在预编译版指令行模式下支持使用API翻译,不部署项目

DDXDB avatar Sep 17 '24 23:09 DDXDB

这个具体没懂,是使命令行工具调用openai 接口的吗?

abse4411 avatar Sep 24 '24 15:09 abse4411

这个具体没懂,是使命令行工具调用openai 接口的吗?

对,而且是在分发版实现

DDXDB avatar Sep 24 '24 17:09 DDXDB

这个具体没懂,是使命令行工具调用openai 接口的吗?

对,而且是在分发版实现

这个openai API兼容接口在config.yaml文件就可以配置了,一样使用的:

    open_ai:
      init:
        base_url: http://localhost:11434/v1/
        api_key: 'ollama'

至于openai API兼容接口可以通过ollama,tgw,vllm等框架提供就行,或者是openai原生的也行。命令行使用方式:

t {index_or_name} -t openai -n {model_name} -l {lang}

abse4411 avatar Sep 25 '24 15:09 abse4411