lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Azure / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
39.94k stars 9.09k forks source link

[Question] Docker部署之后,配置了代理地址和Key,但是无法正常工作. #414

Closed xieyezi closed 9 months ago

xieyezi commented 10 months ago

🧐 问题描述 | Proposed Solution

Docker 传入环境变量部署之后,配置了代理地址和Key,但是无法正常工作.

image

📝 补充信息 | Additional Information

亲测,代理地址和key是可用的.

下面是调用的log:

fetch("http://xieyezi.com:9001/api/openai/chat", {
  "headers": {
    "accept": "*/*",
    "accept-language": "zh-CN,zh;q=0.9,en;q=0.8",
    "content-type": "application/json",
    "proxy-connection": "keep-alive",
    "x-lobe-chat-access-code": "xieyezi",
    "x-openai-api-key": "",
    "x-openai-end-point": ""
  },
  "referrer": "http://xieyezi.com:9001/chat",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": "{\"model\":\"gpt-3.5-turbo-16k\",\"stream\":true,\"frequency_penalty\":0,\"presence_penalty\":0,\"temperature\":0.6,\"top_p\":1,\"messages\":[{\"content\":\"你好\",\"createAt\":1699240081381,\"id\":\"aTzWo8T4\",\"meta\":{\"avatar\":\"😀\"},\"role\":\"user\",\"updateAt\":1699240083725,\"topicId\":\"kxBLs6Gm\"},{\"content\":\"\",\"createAt\":1699240081382,\"id\":\"FPljJGyt\",\"meta\":{\"avatar\":\"🤯\",\"backgroundColor\":\"rgba(0,0,0,0)\"},\"parentId\":\"aTzWo8T4\",\"role\":\"assistant\",\"updateAt\":1699240083725,\"extra\":{\"fromModel\":\"gpt-3.5-turbo-16k\"},\"topicId\":\"kxBLs6Gm\"},{\"content\":\"你好\",\"createAt\":1699240233982,\"id\":\"7jjuU8iC\",\"meta\":{\"avatar\":\"😀\"},\"role\":\"user\",\"updateAt\":1699240233982,\"topicId\":\"kxBLs6Gm\"},{\"content\":\"\",\"createAt\":1699240233983,\"id\":\"9C4JZR40\",\"meta\":{\"avatar\":\"🤯\",\"backgroundColor\":\"rgba(0,0,0,0)\"},\"parentId\":\"7jjuU8iC\",\"role\":\"assistant\",\"updateAt\":1699240236865,\"topicId\":\"kxBLs6Gm\",\"extra\":{\"fromModel\":\"gpt-3.5-turbo-16k\"}},{\"content\":\"你好\\n\",\"createAt\":1699240240383,\"id\":\"TEt4tNFH\",\"meta\":{\"avatar\":\"😀\"},\"role\":\"user\",\"updateAt\":1699240240384,\"topicId\":\"kxBLs6Gm\"},{\"content\":\"\",\"createAt\":1699240240384,\"id\":\"4U5xTUQ2\",\"meta\":{\"avatar\":\"🤯\",\"backgroundColor\":\"rgba(0,0,0,0)\"},\"parentId\":\"TEt4tNFH\",\"role\":\"assistant\",\"updateAt\":1699240241314,\"topicId\":\"kxBLs6Gm\",\"extra\":{\"fromModel\":\"gpt-3.5-turbo-16k\"}},{\"content\":\"你好\",\"createAt\":1699240306358,\"id\":\"hN97PuNE\",\"meta\":{\"avatar\":\"😀\"},\"role\":\"user\",\"updateAt\":1699240306361,\"topicId\":\"kxBLs6Gm\"}]}",
  "method": "POST",
  "mode": "cors",
  "credentials": "include"
});
lobehubbot commented 10 months ago

👀 @xieyezi

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

xieyezi commented 10 months ago

今天我用docker部署了最新的镜像,但是聊天依旧返回"...",是因为系统或者docker版本的原因吗?

Docker: 24.0.2
Ubuntu: 18.04
lobehubbot commented 10 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Today I deployed the latest image using docker, but the chat still returns "...". Is it because of the system or docker version?


Docker: 24.0.2
Ubuntu: 18.04
xieyezi commented 10 months ago

我排查发现,当我点击 “连通性检查”按钮调用 /api/openai/models 接口时,服务器返回 500 错误

lobehubbot commented 10 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I checked and found that when I clicked the "Connectivity Check" button to call the /api/openai/models interface, the server returned a 500 error

xieyezi commented 10 months ago

this is respone for /api/openai/models interface:

<!DOCTYPE html>
<html>
    <head>
        <meta charSet="utf-8"/>
        <meta name="viewport" content="width=device-width"/>
        <title>500: Internal Server Error</title>
        <meta name="next-head-count" content="3"/>
        <noscript data-n-css=""></noscript>
        <script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script>
        <script src="/_next/static/chunks/webpack-179b7db753cfbe84.js" defer=""></script>
        <script src="/_next/static/chunks/framework-80ef52d29d0c23c7.js" defer=""></script>
        <script src="/_next/static/chunks/main-a708b9bfc49b97de.js" defer=""></script>
        <script src="/_next/static/chunks/pages/_app-73d27a91b91bbc4a.js" defer=""></script>
        <script src="/_next/static/chunks/pages/_error-b8f91cf17964263d.js" defer=""></script>
        <script src="/_next/static/iKEFAHpmt0ksewHJhJleD/_buildManifest.js" defer=""></script>
        <script src="/_next/static/iKEFAHpmt0ksewHJhJleD/_ssgManifest.js" defer=""></script>
    </head>
    <body>
        <div id="__next">
            <div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center">
                <div style="line-height:48px">
                    <style>
                        body {
                            color: #000;
                            background: #fff;
                            margin: 0
                        }

                        .next-error-h1 {
                            border-right: 1px solid rgba(0,0,0,.3)
                        }

                        @media (prefers-color-scheme: dark) {
                            body {
                                color:#fff;
                                background: #000
                            }

                            .next-error-h1 {
                                border-right: 1px solid rgba(255,255,255,.3)
                            }
                        }
                    </style>
                    <h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1>
                    <div style="display:inline-block">
                        <h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error
                        <!-- -->
                        .</h2>
                    </div>
                </div>
            </div>
        </div>
        <script id="__NEXT_DATA__" type="application/json">
            {"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"iKEFAHpmt0ksewHJhJleD","isFallback":false,"isExperimentalCompile":false,"err":{"name":"Internal Server Error.","message":"500 - Internal Server Error.","statusCode":500},"gip":true,"scriptLoader":[]}
        </script>
    </body>
</html>
arvinxx commented 10 months ago

openai 的服务本身挂了哈 : https://status.openai.com/ 请等他们修吧

xieyezi commented 10 months ago

今天早上测试,依然有该问题

lobehubbot commented 10 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Tested this morning and still have the problem

xieyezi commented 10 months ago

openai 的服务本身挂了哈 : status.openai.com 请等他们修吧

open ai 服务已经恢复,但是我刚刚测试仍然有该问题,我已经确认过,地理地址和key均没有问题:

截屏2023-11-09 23 27 23 截屏2023-11-09 23 27 36
xieyezi commented 10 months ago

今天我用docker部署了最新的镜像,但是聊天依旧返回"...",是因为系统或者docker版本的原因吗?

Docker: 24.0.2
Ubuntu: 18.04

是否和我的环境有关系?

lobehubbot commented 10 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Today I deployed the latest image using docker, but the chat still returns "...". Is it because of the system or docker version?

Docker: 24.0.2
Ubuntu: 18.04

Does it have anything to do with my environment?

xieyezi commented 10 months ago

你们可以用你们的代理地址和key试一试吗?

http://xieyezi.com:9002

lobehubbot commented 10 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Can you try it with your proxy address and key?

arvinxx commented 10 months ago

@xieyezi 我试了下是可以的。建议检查下代理?

image image
lobehubbot commented 9 months ago

👋 @{{ github.event.issue.user.login }}
Since the issue was labeled with 🤔 Need Reproduce, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.\ 由于该 issue 被标记为需要更多信息,却 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。

lobehubbot commented 9 months ago

✅ @xieyezi

This issue is closed, If you have any questions, you can comment and reply.\ 此问题已经关闭。如果您有任何问题,可以留言并回复。