Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is environment variable NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT working ? #111

Open
Dessoul opened this issue Jul 20, 2023 · 4 comments
Open

Is environment variable NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT working ? #111

Dessoul opened this issue Jul 20, 2023 · 4 comments

Comments

@Dessoul
Copy link

Dessoul commented Jul 20, 2023

Hi !

Thank you for the nice tool.

I am settting custom value for NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT environement variable (in .env.local).

But it has no effect. When I am running the docker I get always the exact same standard pre-prompt. Is is normal ?

@Dessoul Dessoul changed the title Is envirnoemental variable NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT working ? Is environemental variable NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT working ? Jul 20, 2023
@Dessoul Dessoul changed the title Is environemental variable NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT working ? Is environment variable NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT working ? Jul 20, 2023
@iguy0
Copy link

iguy0 commented Jul 23, 2023

Not normal. Docker-compose is not picking up the envs. This ended up "working" for me: (I'm still running into other issues)

`version: '3.6'

services:
chatbot:
container_name: chatbot
build: .
ports:
- 3000:3000
volumes:
- .env.local:/app/.env
env_file:
- .env.local
mongo:
image: mongo
restart: always
volumes:
- mongodb-configdb:/data/configdb
- mongodb-data:/data/db
env_file:
- .env.local

volumes:
mongodb-data:
name: chatui-mongodb-data
mongodb-configdb:
name: chatui-mongodb-configdb
`

Please note the .env file being picked up here:

env_file:
  - .env.local

Cheers! Good luck.

@Dessoul
Copy link
Author

Dessoul commented Aug 1, 2023

Hi !

Thank you for your anwser.

I edited my post becasue indeed I was confusing.

I modified the NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT in the .env.local file.

And still it has no effect.

If you modifiy it in the .env.local file, do you see any effect after you deploy it on the default prompt ?

@jerkstorecaller
Copy link

@iguy0 , do you actually see a modified prompt when you load the webpage? It uses the default even when I use your compose file.

@1h8fulkat
Copy link

"The issue with next js build not having the environment variables is caused by how next js looks up environment variables. It requires a .env.local to be present, which is not present in the docker build step. The reason is that it's included in the .dockerignore, so the context doesn't have a .env.local."

See this issue for the original repo for the solution to the docker container not getting the NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT env variable:

mckaywrigley#904

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants