waylaidwanderer / PandoraAI

PandoraAI is a web chat client powered by node-chatgpt-api, allowing users to easily chat with multiple AI systems while also offering support for custom presets. With its seamless and convenient design, PandoraAI provides an engaging conversational AI experience.
https://github.com/waylaidwanderer/node-chatgpt-api
MIT License
837 stars 215 forks source link

The ai does not respond after Intranet penetration #126

Closed sizukamasou closed 1 year ago

sizukamasou commented 1 year ago

I have successfully deployed the node-chatgpt-api and pandoraAI.

And I can run it on my computer. Talk to bing normally.

I then mapped the access address 192.168.0.101:3000 to a URL using ngrok.

My other devices can access this mapped URL, but cannot interact with the ai.

I don't know how to set it up so that I can access my deployed pandoraAI from another device or location.

Here is my configuration: image image

I'm using clash's global proxy, ports 7890

Similarly, I've deployed pandora in the past,It is chatgpt3.5. It works fine with the same through-mapping method

Please help me, thank you!

waylaidwanderer commented 1 year ago

Make sure you're not running the client in dev mode if you're accessing it from outside. You have to build it and run the production build instead.

waylaidwanderer commented 1 year ago

Oh, and the API_BASE_URL needs to be behind Ngrok as well since the client will be connecting to this URL client-side.

sizukamasou commented 1 year ago

哦,API_BASE_URL 也需要在 Ngrok 后面,因为客户端将连接到此 URL 客户端。

Oh, and the API_BASE_URL needs to be behind Ngrok as well since the client will be connecting to this URL client-side.

Still no success I ran npm run buildmingl as you suggested,The first time I opened the page, it showed 500 errors.

Then chatgpt told that it was missing the configuration of setting.js under pandoraAI,Originally I couldn't find it on github, so I asked gpt to tell me what was in it, and I tried to create it

image (https://7v4x539662.imdo.co/It is the domain name mapped by ddns)

then

I tried this domain name in api_base_url under the.env file image I also tried using http://localhost:3001

And shut down the firewall on the computer I then successfully started npm run build image

I can then communicate with the ai through this domain name image

But the phone still couldn't interact 62A1F7E584C6E3985C62308F6386BA23

I really don't know how to change my configuration,Or is there a problem with my ddns software?

waylaidwanderer commented 1 year ago

This isn't a bug with the repo so I'm converting this issue to a Help thread.