Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

指令行模式支持openAI API #32

Open
DDXDB opened this issue Sep 17, 2024 · 3 comments
Open

指令行模式支持openAI API #32

DDXDB opened this issue Sep 17, 2024 · 3 comments

Comments

@DDXDB
Copy link

DDXDB commented Sep 17, 2024

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

@abse4411
Copy link
Owner

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

@DDXDB
Copy link
Author

DDXDB commented Sep 24, 2024

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

对,而且是在分发版实现

@abse4411
Copy link
Owner

这个具体没懂,是使命令行工具调用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}

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

No branches or pull requests

2 participants