Open gboxxx opened 1 year ago
Can you try running jsongenius container separately?
docker run -e OPEN_AI_KEY='<your_key>' -e WS_URL='<browserless_ws_url>' semanser/jsongenius
You can find the browserless_ws_url
from the browserless container logs output.
It runs, but when I try to hit the API it crashes.
I'm using -p 3032:8080, not sure if that helps.
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
[GIN-debug] POST /lookup --> main.main.func1 (3 handlers)
[GIN-debug] [WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.
Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details.
[GIN-debug] Listening and serving HTTP on :8080
[GIN] 2023/10/06 - 12:55:40 | 404 | 679ns | 172.17.0.1 | GET "/"
[GIN] 2023/10/06 - 12:55:41 | 404 | 650ns | 172.17.0.1 | GET "/favicon.ico"
[GIN] 2023/10/06 - 12:55:51 | 404 | 519ns | 172.17.0.1 | POST "/"
2023/10/06 12:55:55 EOF
I updated the repo to use go-rod and rod docker image instead of browserless and it seems to be more stable and less CPU intensive.
I also updated docker-compose file to use the updated version and released a new docker image tag.
Let me know if you have any other issues!
Turns out it was because I was sending a blank post request - was just trying to test to see if the endpoint was up and working. I guess you have no default response? That's when it crashes, with Rod too.
If I send rubbish JSON, I get a 200 OK response from the API, but this in the container:
2023/10/06 15:50:35 Completion error: error, status code: 400, message: None is not of type 'object' - 'functions.0.parameters'
Will test properly tomorrow - thanks!
It is now working, but the few sites i've tried, I only get one entry in the JSON response. Here's an example site: https://online.mpls.k12.mn.us/Staff
Not sure what's going on - browserless works fine, but JSON Genius just ends up running and then tanking a few seconds later. I'm using the default
docker-compose.yml
.