kuafuai / DevOpsGPT

Multi agent system for AI-driven software development. Combine LLM with DevOps tools to convert natural language requirements into working software. Supports any development language and extends the existing code.
https://www.kuafuai.net
Other
6.51k stars 837 forks source link

Can u support openai proxy ? #62

Closed blackwhites closed 1 year ago

blackwhites commented 1 year ago

In china the openai api is blocked,we use proxy address to invoke it.Can u support proxy in the configuration?

For example https://openkey.cloud/ Token(API Key): sk-XXXXXXX

booboosui commented 1 year ago

Yes, the latest master version supports proxy, the default value of "proxy" is "None"

# Configure the interface information of openai and azure. If a certain type of interface is not needed, please completely delete the corresponding element (openai\azure). 
# 配置 openai 和 azure 的接口信息(替换 sk-xxxx 为你的 key),如果不需要某个类型的接口,请将对应的元素整个删除掉(openai\azure),【注意】数组中最后一个元素后面不要加逗号、您可能需要开启全局代理来访问API接口
GPT_KEYS: |
    {
        "openai": {
            "keys": [
                {"sk-xxxx": {"count": 0, "timestamp": 0}}
            ],
            "api_type": "open_ai",
            "api_base": "https://api.openai.com/v1",
            "api_version": "2020-11-07",
            "proxy": "None"
        }
        ,
        "azure": {
            "keys": [
                {"sk-xxxx": {"count": 0, "timestamp": 0}}
            ],
            "api_type": "azure",
            "api_base": "https://example-gpt.openai.azure.com/",
            "api_version": "2023-05-15",
            "deployment_id": "deployment-name",
            "proxy": "None"
        }
    }