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

当回答过长时,代理服务器自动关闭连接,日志错误显示499错误 #68

Open
BlakrPander opened this issue Oct 26, 2023 · 0 comments

Comments

@BlakrPander
Copy link

日志如下:

SCF_FunctionName:OpenAI-Proxy
SCF_Namespace:default
SCF_StartTime:1698287749552
SCF_RequestId:***
SCF_Duration:14312
SCF_Alias:$DEFAULT
SCF_Qualifier:$LATEST
SCF_LogTime:1698287764481804310
SCF_RetryNum:0
SCF_MemUsage:18266024.00
SCF_Level:INFO
SCF_Message:ERROR RequestId: 4280633807e4294e004bc5642e9f0709 Result: {"errorCode":-1,"errorMessage":"Request was canceled by client or apigw timed out earlier than function.","statusCode":499}
SCF_Type:Platform
SCF_StatusCode:499

已经将超时时间修改为900了,但是还是会出现这种错误,使用同样prompts对官方api_base发送时虽然回答时间很长,但不会出现中断现象,请问该如何解决?
测试代码如下:

prompt = "请你用python写一段素数筛"
    response=openai.ChatCompletion.create(
        api_key="sk-***",
        api_base="https://service-***.usw.apigw.tencentcs.com",
        model="gpt-3.5-turbo",
        messages=[
            {"role":"user","content":prompt},
        ]
    )
    answer=response.choices[0].message.content
    print(answer)
    ```
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

1 participant