dotneet / smart-chatbot-ui

An open source ChatGPT UI.
https://smart-chatbot-ui.vercel.app/
MIT License
475 stars 98 forks source link

NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT is not configurable, only hard-coded default is used #146

Open jerkstorecaller opened 1 year ago

jerkstorecaller commented 1 year ago

Really standard setup, I only modified the default model and prompt, but only the default model is changed.

admin@server:~/smart-chatbot-ui$ cat docker-compose.yml
version: '3.6'

services:
  chatui:
    container_name: chatui
    build: .
    expose:
      - 3000
    restart: on-failure:5
    env_file:
      - .env.local
    environment:
      MONGO_INITDB_ROOT_USERNAME: root
      MONGO_INITDB_ROOT_PASSWORD: example
  mongo:
    image: mongo:5.0
    container_name: chatui-mongo
    restart: on-failure:5
    volumes:
      - mongodb-configdb:/data/configdb
      - mongodb-data:/data/db
    env_file:
      - .env.local
    environment:
      MONGO_INITDB_ROOT_USERNAME: root
      MONGO_INITDB_ROOT_PASSWORD: example

volumes:
  mongodb-data:
    name: chatui-mongodb-data
  mongodb-configdb:
    name: chatui-mongodb-configdb
admin@server:~/smart-chatbot-ui$ docker compose down
[+] Running 2/2
 ✔ Container chatui-mongo  Removed                                                                                            0.3s
 ✔ Container chatui        Removed                                                                                            0.3s
admin@server:~/smart-chatbot-ui$ docker volume rm chatui-mongodb-configdb chatui-mongodb-data
chatui-mongodb-configdb
chatui-mongodb-data
admin@server:~/smart-chatbot-ui$ cat .env.local | grep PROMPT
NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT="You are a knowledgeable AI assistant. Follow the user's instructions and attempt to answer their queries. Respond using markdown."
admin@server:~/smart-chatbot-ui$ docker compose up -d
[+] Running 4/4
 ✔ Volume "chatui-mongodb-configdb"  Created                                                                                  0.0s
 ✔ Volume "chatui-mongodb-data"      Created                                                                                  0.0s
 ✔ Container chatui-mongo            Started                                                                                  0.4s
 ✔ Container chatui                  Started      

Result from a new private browser window:

image

jerkstorecaller commented 1 year ago

P.S. the default prompt is bad and should be changed to what I specified. It's supposed to be an instruct prompt. Giving it a name doesn't do that. I mean, it knows what ChatGPT is so it kinda works, but it's better to just state in generic instruct language what you want it to do.

Also "follow instructions" doesn't explicitly say "answer the user".

I get it, it works. But that's because GPT is good enough to make up for the awful prompt. :)