Open MrCsabaToth opened 3 days ago
Looks like others have the same problem:
Also note when I peek at the logs in my convex account online, I see a world:restartDeadWorlds
event every single minute.
In the .env file the VITE was pointing to the convex cloud. I modified that to point to my local convex server URL. Now it seems that the ai town backend kinda-sorta sees the convex server, however I still get the no default world error and not much happening when clicking on the interact button. Any help is appreciated.
Oh, I also moved the local convex server binary into the source root, looks like the gitignore even expects that. I was hoping for a miracle.
There’s a seed script that creates a world. It’s probably called “predev”
in package scripts and is probably something like just convex run init
On Tue, Oct 22, 2024 at 9:02 PM Csaba Toth @.***> wrote:
In the .env file the VITE was pointing to the convex cloud. I modified that to point to my local convex server URL. Now it seems that the ai town backend kinda-sorta sees the convex server, however I still get the no default world error and not much happening when clicking on the interact button. Any help is appreciated.
Oh, I also moved the local convex server binary into the source root, looks like the gitignore even expects that. I was hoping for a miracle.
— Reply to this email directly, view it on GitHub https://github.com/a16z-infra/ai-town/issues/256#issuecomment-2430831969, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACZQWZN5E6KYNWHMDKF4STZ44NWPAVCNFSM6AAAAABQNX6S6GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZQHAZTCOJWHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>
There’s a seed script that creates a world. It’s probably called “predev” in package scripts and is probably something like
just convex run init
So that should scaffold all the objects? I saw it in the package.json, theoretically it should be called, but I'll check it!
While trying to execute npm run predev
I got
No CONVEX_DEPLOYMENT set, run
npx convex dev
to configure a Convex project
So that's something to start with.
Another question is when I start the convex backend server binary, I see that it listens on 3210 port, but it also starts a proxy right away on the 3211 port. When I configure the VITE_CONVEX_URL
in .env.local
should I point to the 3210, or the proxy 3211 port, or ... I shouldn't fiddle with that file at all?
Well, I ran npx convex dev
, and since I know I already have the empty project in the convex cloud I selected "existing project" and picked that one. This modified the .env.local
, adding back:
# Deployment used by `npx convex dev`
CONVEX_DEPLOYMENT=dev:blabla-foobar-123 # team: csaba-toth, project: ai-town-123456
matching my online convex dev project. What I don't understand is where do we inidicate anywhere at all that we have that local convex server? The cloud project only knows about the local ollama via an environment variable. I feel like the AI Town backend should communicate with that local convex server, but it actually doesn't? If I simply stop the local convex server in the 2nd terminal and start the AI Town server in the 3rd terminal, it sitll indicates everything is honky and dory (10:17:50 Convex functions ready! (2.65s)
). I expected it to fail since the local convex server is not running. Some configuration step is missing for sure.
Should I indicate in another unkown environment variable for the convex project that I have that local convex server? BTW the convex cloud project is still bare ass empty (even after re-executing the just convex dev --run init --until-success
).
Ah npx goes straight to cloud dev. This repo uses just convex
to talk to
local/dev based on setup.
3120 is right. 3211 is for http endpoints
On Wed, Oct 23, 2024 at 9:37 AM Csaba Toth @.***> wrote:
While trying to execute npm run predev I got
No CONVEX_DEPLOYMENT set, run npx convex dev to configure a Convex project
So that's something to start with.
Another question is when I start the convex backend server binary, I see that it listens on 3210 port, but it also starts a proxy right away on the 3211 port. When I configure the VITE_CONVEX_URL in .env.local should I point to the 3210, or the proxy 3211 port, or ... I shouldn't fiddle with that file at all?
— Reply to this email directly, view it on GitHub https://github.com/a16z-infra/ai-town/issues/256#issuecomment-2432815506, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACZQW6UVY2K4GPTTOOYXI3Z47GDBAVCNFSM6AAAAABQNX6S6GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZSHAYTKNJQGY . You are receiving this because you commented.Message ID: @.***>
Ah npx goes straight to cloud dev. This repo uses
just convex
to talk to local/dev based on setup. 3120 is right. 3211 is for http endpoints
Thanks for the fast reply. I'm definitely mixing up stuff then. Wherever I see npx
I should just use just convex
. Three questions then:
VITE_CONVEX_URL
and CONVEX_DEPLOYMENT
in the .env.local
file?I'd check out the README and files. you might also check out the convex tour / a simple repo example to see the cloud version working. For local the CONVEX_URL should be something on localhost or 127.0.0.1. If it's set to the cloud and you want to run locally you can clear the values and run the dev command again and it'll re-configure.
On Wed, Oct 23, 2024 at 10:36 AM Csaba Toth @.***> wrote:
Ah npx goes straight to cloud dev. This repo uses just convex to talk to local/dev based on setup. 3120 is right. 3211 is for http endpoints
Thanks for the fast reply. I'm definitely mixing up stuff then. Wherever I see npx I should just use just convex. Three questions then:
- Does the convex cloud project plays any role during a local setup?
- Related to the first: should that project ID or cloud URL appear anywhere in the config files?
- What should be the approximate shape of the value of VITE_CONVEX_URL and CONVEX_DEPLOYMENT in the .env.local file?
— Reply to this email directly, view it on GitHub https://github.com/a16z-infra/ai-town/issues/256#issuecomment-2432965125, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACZQW4NTJ3CDWQIWBZDR2DZ47NAXAVCNFSM6AAAAABQNX6S6GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZSHE3DKMJSGU . You are receiving this because you commented.Message ID: @.***>
This is on an M3 MacBook Pro.
just convex env set OLLAMA_HOST http://localhost:11434
which is not in the top local run guide, but mentioned later when the guide is fiddling with containers. This command resulted in✔ Successfully set OLLAMA_HOST to http://localhost:11434 (on dev deployment oceanic-kudu-143)
and I can see the env variable set in the convex cloud dev environment.ai-town % npm run dev:backend
ai-town % npm run dev:fontend
http://localhost:5173/ai-town
, however it's at the main menu and nothing happens when I click on theInteract
button.Freeze
button also seemingly nothing happens, however the back-end terminal displays an error (the last three lines, in red):I'm new to AI town. The guide doesn't tell anything about setting a default world or anything. DO I need ot configure something on the convex web UI? Does that even come into picture when running AI Town locally? I see all of the log messages there too. I'm stuck.