Code Monkey home page Code Monkey logo

Comments (37)

acheong08 avatar acheong08 commented on June 1, 2024 1

i would take it that if you use google to sign in instead of regular sign in then there would be a problem

If you use google sign in, there won't be autofill but as long as you are able to log in, it's fine

from chatgpt-api-server.

acheong08 avatar acheong08 commented on June 1, 2024 1

Fixed at acheong08/ChatGPT-API-agent@d9aa137

from chatgpt-api-server.

org-org-org avatar org-org-org commented on June 1, 2024 1

为什么content.js里是这样的
let ws_route = "ws://" + endpoint + "/client/register";
let ws = new WebSocket(ws_route);
router.GET("/client/register", handlers.Client_register)注册的不是HTTP协议的吗,我看浏览器的控制台发现好像ws.onopen没有触发😂

from chatgpt-api-server.

org-org-org avatar org-org-org commented on June 1, 2024 1

不是,{"error":"No available clients"} 是因为"/client/register"注册的handlers.Client_register没有被调用过,发"/api/ask"走到
if len(connectionPool.Connections) == 0 {
c.JSON(503, gin.H{
"error": "No available clients",
})
return
}这里就退出了,现在多半是因为你的ws没有建立成功,我这边是因为8080端口被占用了。。。你换一个别的试试,虽然我一开始用的是7777,但是7777不行我才换成默认的8080,结果现在换回7777又突然可以了🤣

from chatgpt-api-server.

Yusin2Chen avatar Yusin2Chen commented on June 1, 2024

same problem here

from chatgpt-api-server.

axsddlr avatar axsddlr commented on June 1, 2024

same issue here

from chatgpt-api-server.

acheong08 avatar acheong08 commented on June 1, 2024

Seems to be a bug with the agent caused by error handlers acting strangely. I have reverted that specific change and it should work now

from chatgpt-api-server.

acheong08 avatar acheong08 commented on June 1, 2024

Seems to be a bug with the agent caused by error handlers acting strangely. I have reverted that specific change and it should work now

where is the API Key located?

You set it when you run the executable.

from chatgpt-api-server.

axsddlr avatar axsddlr commented on June 1, 2024

Seems to be a bug with the agent caused by error handlers acting strangely. I have reverted that specific change and it should work now

where is the API Key located?

You set it when you run the executable.

i would take it that if you use google to sign in instead of regular sign in then there would be a problem

from chatgpt-api-server.

acheong08 avatar acheong08 commented on June 1, 2024

The API key is set by you and has nothing to do with OpenAI. It's just for authenticating your requests to prevent malicious access to your API endpoint

from chatgpt-api-server.

acheong08 avatar acheong08 commented on June 1, 2024

You can just fill out dummy credentials for it to open the tabs

from chatgpt-api-server.

axsddlr avatar axsddlr commented on June 1, 2024

issue still occuring with new changes

commands:

sudo ChatGPT-API-server 8180 546

curl "http://<ip-of-server>:8180/api/ask" -X POST --header 'Authorization: 546' -d '{"content": "Hello world", "conversation_id": "<optional>", "parent_id": "<optional>"}'

result

{"error":"No available clients"}

[GIN] 2022/12/24 - 23:13:47 | 503 | 287.46µs | 192.168.xxx.xxx | POST "/api/ask"

from chatgpt-api-server.

acheong08 avatar acheong08 commented on June 1, 2024

The changes are on the side of the agent. You might want to update that https://github.com/ChatGPT-Hackers/ChatGPT-API-agent

from chatgpt-api-server.

axsddlr avatar axsddlr commented on June 1, 2024

The changes are on the side of the agent. You might want to update that https://github.com/ChatGPT-Hackers/ChatGPT-API-agent

yeap, git pulled the changes and re-did setup as is on firefox

from chatgpt-api-server.

acheong08 avatar acheong08 commented on June 1, 2024

Working just fine for me. You have to press reload in the debugging page
image

from chatgpt-api-server.

axsddlr avatar axsddlr commented on June 1, 2024

after a few tries, got it to work. I can try to containerize this server end

from chatgpt-api-server.

9cat avatar 9cat commented on June 1, 2024

Fixed at ChatGPT-Hackers/ChatGPT-API-agent@d9aa137

Great , it works like a champ

from chatgpt-api-server.

zenorochaV1 avatar zenorochaV1 commented on June 1, 2024

I still report an error No available clients, Do I need to manually register the client through GET client/register

from chatgpt-api-server.

zenorochaV1 avatar zenorochaV1 commented on June 1, 2024

I still report an error No available clients, Do I need to manually register the client through GET client/register

from chatgpt-api-server.

acheong08 avatar acheong08 commented on June 1, 2024

You shouldn't have to

from chatgpt-api-server.

acheong08 avatar acheong08 commented on June 1, 2024

You might need to restart firefox. There are bugs with their containers sometimes

from chatgpt-api-server.

acheong08 avatar acheong08 commented on June 1, 2024

Make sure your agent can contact your API

from chatgpt-api-server.

zenorochaV1 avatar zenorochaV1 commented on June 1, 2024

Make sure your agent can contact your API

Thank you for your reply. I have updated the extension and restarted it for several times, but it still fails. How can I check whether the API can connect to the client

from chatgpt-api-server.

acheong08 avatar acheong08 commented on June 1, 2024

Check the server output. It should show a connection id or a GET request to /client/register if it succeeds in connecting

from chatgpt-api-server.

acheong08 avatar acheong08 commented on June 1, 2024

You can also debug the JavaScript be checking the console

from chatgpt-api-server.

zenorochaV1 avatar zenorochaV1 commented on June 1, 2024

You can also debug the JavaScript be checking the console

Request status code is 400 , Let me check ths.

from chatgpt-api-server.

zenorochaV1 avatar zenorochaV1 commented on June 1, 2024

You can also debug the JavaScript be checking the console

It's up and running thank you very much

from chatgpt-api-server.

acheong08 avatar acheong08 commented on June 1, 2024

What was the issue and how did you solve it? Leave it here for those that come after

from chatgpt-api-server.

Yusin2Chen avatar Yusin2Chen commented on June 1, 2024

How did you solve that, please help me

from chatgpt-api-server.

acheong08 avatar acheong08 commented on June 1, 2024

Make sure the endpoint format is correct. <IP_address>:<port_number>

from chatgpt-api-server.

acheong08 avatar acheong08 commented on June 1, 2024

And make sure it is accessible

from chatgpt-api-server.

org-org-org avatar org-org-org commented on June 1, 2024

谢谢,现在可以了,好像是因为之前8080端口被占用了🤣

from chatgpt-api-server.

Yusin2Chen avatar Yusin2Chen commented on June 1, 2024

谢谢,现在可以了,好像是因为之前8080端口被占用了🤣

请问您是如何解决{"error":"No available clients"} 的问题的呢

from chatgpt-api-server.

ErcinDedeoglu avatar ErcinDedeoglu commented on June 1, 2024

Im getting
{ "error": "No available clients" }
server logs:

[+] Building 28.7s (15/15) FINISHED
 => [internal] load build definition from Dockerfile                                                               0.1s
 => => transferring dockerfile: 356B                                                                               0.0s
 => [internal] load .dockerignore                                                                                  0.1s
 => => transferring context: 2B                                                                                    0.0s
 => [internal] load metadata for docker.io/library/alpine:latest                                                   3.1s
 => [internal] load metadata for docker.io/library/golang:1.19-alpine                                              3.1s
 => [auth] library/alpine:pull token for registry-1.docker.io                                                      0.0s
 => [auth] library/golang:pull token for registry-1.docker.io                                                      0.0s
 => [build 1/6] FROM docker.io/library/golang:1.19-alpine@sha256:a9b24b67dc83b3383d22a14941c2b2b2ca6a103d805cac6  12.8s
 => => resolve docker.io/library/golang:1.19-alpine@sha256:a9b24b67dc83b3383d22a14941c2b2b2ca6a103d805cac6820fd13  0.1s
 => => sha256:cae57157ceaa07c0fffad419f2c4cedc683c31981f466a0fb9fd8cdd434e05d8 5.11kB / 5.11kB                     0.0s
 => => sha256:c158987b05517b6f2c5913f3acef1f2182a32345a304fe357e3ace5fadcad715 2.10MB / 3.37MB                    25.4s
 => => sha256:019cfb932eb08a6864463dc9a70bd1b3370081e9053b80029691335a239edb4c 284.81kB / 284.81kB                 0.7s
 => => sha256:a3a161a37303bc8659d8e025280c2254f9990ba1623e35bd2113c393c800b745 122.31MB / 122.31MB                10.6s
 => => sha256:a9b24b67dc83b3383d22a14941c2b2b2ca6a103d805cac6820fd1355943beaf1 1.65kB / 1.65kB                     0.0s
 => => sha256:f33331e12ca70192c0dbab2d0a74a52e1dd344221507d88aaea605b0219a212f 1.16kB / 1.16kB                     0.0s
 => => sha256:3c6f08178a17a0ffdd75ad4b3903eb4d5afd6353cdcd703f7708be3cb785215e 157B / 157B                         1.0s
 => => extracting sha256:c158987b05517b6f2c5913f3acef1f2182a32345a304fe357e3ace5fadcad715                          0.1s
 => => extracting sha256:019cfb932eb08a6864463dc9a70bd1b3370081e9053b80029691335a239edb4c                          0.0s
 => => extracting sha256:a3a161a37303bc8659d8e025280c2254f9990ba1623e35bd2113c393c800b745                          1.8s
 => => extracting sha256:3c6f08178a17a0ffdd75ad4b3903eb4d5afd6353cdcd703f7708be3cb785215e                          0.0s
 => [stage-1 1/2] FROM docker.io/library/alpine:latest@sha256:8914eb54f968791faf6a8638949e480fef81e697984fba772b3  1.7s
 => => resolve docker.io/library/alpine:latest@sha256:8914eb54f968791faf6a8638949e480fef81e697984fba772b397683519  0.1s
 => => sha256:8914eb54f968791faf6a8638949e480fef81e697984fba772b3976835194c6d4 1.64kB / 1.64kB                     0.0s
 => => sha256:c0d488a800e4127c334ad20d61d7bc21b4097540327217dfab52262adc02380c 528B / 528B                         0.0s
 => => sha256:49176f190c7e9cdb51ac85ab6c6d5e4512352218190cd69b08e6fd803ffbf3da 1.47kB / 1.47kB                     0.0s
 => => sha256:c158987b05517b6f2c5913f3acef1f2182a32345a304fe357e3ace5fadcad715 3.37MB / 3.37MB                     1.3s
 => => extracting sha256:c158987b05517b6f2c5913f3acef1f2182a32345a304fe357e3ace5fadcad715                         24.0s
 => [build 2/6] RUN apk add --no-cache git                                                                         1.9s
 => [build 3/6] RUN mkdir -p /go/src/ChatGPT-API-server                                                            0.4s
 => [build 4/6] WORKDIR /go/src/ChatGPT-API-server                                                                 0.1s
 => [build 5/6] RUN git clone https://github.com/ChatGPT-Hackers/ChatGPT-API-server/ .                             2.5s
 => [build 6/6] RUN go install .                                                                                   7.4s
 => [stage-1 2/2] COPY --from=build /go/bin/ChatGPT-API-server /usr/local/bin/                                     0.1s
 => exporting to image                                                                                             0.1s
 => => exporting layers                                                                                            0.1s
 => => writing image sha256:fa8a4825c42cf50042f1180803b6a828b66755341655ceb1394ea02d6d967e11                       0.0s
 => => naming to docker.io/library/chatgpt-api-server-chatgpt-api-server                                           0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
[+] Running 2/2
 - Network chatgpt-api-server_chatgpt-api-server_default  Created                                                  0.0s
 - Container chatgpt-api-server-chatgpt-api-server-1      C...                                                     0.1s
Attaching to chatgpt-api-server-chatgpt-api-server-1
chatgpt-api-server-chatgpt-api-server-1  | [GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
chatgpt-api-server-chatgpt-api-server-1  |
chatgpt-api-server-chatgpt-api-server-1  | [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
chatgpt-api-server-chatgpt-api-server-1  |  - using env:        export GIN_MODE=release
chatgpt-api-server-chatgpt-api-server-1  |  - using code:       gin.SetMode(gin.ReleaseMode)
chatgpt-api-server-chatgpt-api-server-1  |
chatgpt-api-server-chatgpt-api-server-1  | [GIN-debug] GET    /client/register          --> github.com/ChatGPT-Hackers/ChatGPT-API-server/handlers.Client_register (4 handlers)
chatgpt-api-server-chatgpt-api-server-1  | [GIN-debug] POST   /api/ask                  --> github.com/ChatGPT-Hackers/ChatGPT-API-server/handlers.API_ask (4 handlers)
chatgpt-api-server-chatgpt-api-server-1  | [GIN-debug] GET    /api/connections          --> github.com/ChatGPT-Hackers/ChatGPT-API-server/handlers.API_getConnections (4 handlers)
chatgpt-api-server-chatgpt-api-server-1  | [GIN-debug] [WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.
chatgpt-api-server-chatgpt-api-server-1  | Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details.
chatgpt-api-server-chatgpt-api-server-1  | [GIN-debug] Listening and serving HTTP on :8080
chatgpt-api-server-chatgpt-api-server-1  | 8080 <API_KEY>
chatgpt-api-server-chatgpt-api-server-1  | [GIN] 2022/12/26 - 07:37:46 | 404 |       1.631µs |      172.18.0.1 | GET      "/"
chatgpt-api-server-chatgpt-api-server-1  | [GIN] 2022/12/26 - 07:37:46 | 404 |       1.529µs |      172.18.0.1 | GET      "/favicon.ico"
chatgpt-api-server-chatgpt-api-server-1  | [GIN] 2022/12/26 - 07:38:35 | 400 |       45.23µs |      172.18.0.1 | POST     "/api/ask"
chatgpt-api-server-chatgpt-api-server-1  | [GIN] 2022/12/26 - 07:38:47 | 400 |      25.966µs |      172.18.0.1 | POST     "/api/ask"
chatgpt-api-server-chatgpt-api-server-1  | [GIN] 2022/12/26 - 07:39:19 | 401 |     110.774µs |      172.18.0.1 | POST     "/api/ask"
chatgpt-api-server-chatgpt-api-server-1  | [GIN] 2022/12/26 - 07:41:18 | 400 |     313.841µs |      172.18.0.1 | POST     "/api/ask"
chatgpt-api-server-chatgpt-api-server-1  | [GIN] 2022/12/26 - 07:41:26 | 400 |      69.856µs |      172.18.0.1 | POST     "/api/ask"
chatgpt-api-server-chatgpt-api-server-1  | [GIN] 2022/12/26 - 07:41:39 | 503 |      54.559µs |      172.18.0.1 | POST     "/api/ask"
chatgpt-api-server-chatgpt-api-server-1  | [GIN] 2022/12/26 - 07:42:05 | 503 |      50.927µs |      172.18.0.1 | POST     "/api/ask"
chatgpt-api-server-chatgpt-api-server-1  | [GIN] 2022/12/26 - 07:42:06 | 503 |      53.567µs |      172.18.0.1 | POST     "/api/ask"
chatgpt-api-server-chatgpt-api-server-1  | [GIN] 2022/12/26 - 07:42:16 | 503 |       46.68µs |      172.18.0.1 | POST     "/api/ask"
chatgpt-api-server-chatgpt-api-server-1  | [GIN] 2022/12/26 - 07:45:35 | 503 |      59.757µs |      172.18.0.1 | POST     "/api/ask"
chatgpt-api-server-chatgpt-api-server-1  | [GIN] 2022/12/26 - 07:45:39 | 503 |      51.142µs |      172.18.0.1 | POST     "/api/ask"

from chatgpt-api-server.

acheong08 avatar acheong08 commented on June 1, 2024

Your agent didn't connect. Make sure your API is accessible to your agents

from chatgpt-api-server.

acheong08 avatar acheong08 commented on June 1, 2024

I don't recommend docker because networking doesn't work as intended sometimes

from chatgpt-api-server.

Tudor44 avatar Tudor44 commented on June 1, 2024

Hello ,

I have solved restarting firefox with the agent, clearing the terminal cache, and restarting the server as follows:

go run main.go 8080 <YOUR-API-KEY>

from chatgpt-api-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.