chat-ui icon indicating copy to clipboard operation
chat-ui copied to clipboard

Users can't get passed "Start Chatting" modal - ethicsModelAcceptedAt not getting set?

Open cfregly opened this issue 2 years ago • 7 comments

image

let me know what more info you need to debug. just keeps redirecting back to home and never clears the modal.

cfregly avatar May 19 '23 19:05 cfregly

image

cfregly avatar May 22 '23 05:05 cfregly

Mmh, I can't seem to reproduce the issue. Can you let me know the following:

  • Are you running this locally or is it a hosted version ?
  • What browser/OS combination are you using ?
  • Did you set your .env.localcorrectly ?
  • What mongoDB instance are you using ?

Then I can better help you getting it to run. Thanks ! 😄

nsarrazin avatar May 23 '23 06:05 nsarrazin

  • Are you running this locally or is it a hosted version ? "locally" on an EC2 instance server: http://X.X.X.X

  • What browser/OS combination are you using ? Chrome/MacOS (client), Server linux/ubuntu

  • Did you set your .env.local correctly ?

MONGODB_URL=mongodb://XXX:[email protected]:27017/?tls=true&tlsCAFile=rds-combined-ca-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false
MONGODB_DB_NAME=XXX

COOKIE_NAME=hf-chat
#HF_ACCESS_TOKEN=#hf_<token> from https://huggingface.co/settings/token

# Parameters to enable "Sign in with HF"
OPENID_CLIENT_ID=
OPENID_CLIENT_SECRET=
OPENID_PROVIDER_URL=

HF_HUB_ENABLE_HF_TRANSFER=false

MODELS=`[
  {
    "name": "OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5",
    "endpoints": [
        {"url": "http://X.X.X.X:8080/generate_stream", "weight": 100}
    ],
    "userMessageToken": "<|prompter|>",
    "assistantMessageToken": "<|assistant|>",
    "messageEndToken": "</s>",
    "preprompt": "Below are a series of dialogues between various people and an AI assistant. The AI tries to be helpful, polite, honest, sophisticated, emotionally aware, and humble-but-knowledgeable. The assistant is happy to help with almost anything, and will do its best to understand exactly what is needed. It also tries to avoid giving false or misleading information, and it caveats when it isn't entirely sure about the right answer. That said, the assistant is practical and really does its best, and doesn't let caution get too much in the way of being useful.\n-----\n",
    "parameters": {
      "temperature": 0.5,
      "top_p": 0.95,
      "repetition_penalty": 1.2,
      "top_k": 50,
      "truncate": 1000,
      "max_new_tokens": 1024
    }
  }
]`
OLD_MODELS=`[]`# any removed models, `{ name: string, displayName?: string, id?: string }`

PUBLIC_ORIGIN=#
PUBLIC_GOOGLE_ANALYTICS_ID=#G-XXXXXXXX / Leave empty to disable
PUBLIC_DEPRECATED_GOOGLE_ANALYTICS_ID=#UA-XXXXXXXX-X / Leave empty to disable

PUBLIC_ANNOUNCEMENT_BANNERS=#`[
#  {
#    "title": "Welcome!",
#    "linkTitle": "Checkout our GitHub repo",
#    "linkHref": "https://github.com/data-science-on-aws"
#  }
#]`

PARQUET_EXPORT_DATASET=
PARQUET_EXPORT_HF_TOKEN=
PARQUET_EXPORT_SECRET=
  • What mongoDB instance are you using ? Amazon DocumentDB with partitionIndexes commented out in the chat-ui code per https://github.com/huggingface/chat-ui/issues/221#issuecomment-1547370643

cfregly avatar May 23 '23 14:05 cfregly

for now, i just had to hard-code as follows:

$ git diff src/lib/types/Settings.ts
diff --git a/src/lib/types/Settings.ts b/src/lib/types/Settings.ts
index 86915ee..b04fdb1 100644
--- a/src/lib/types/Settings.ts
+++ b/src/lib/types/Settings.ts
@@ -19,5 +19,7 @@ export interface Settings extends Timestamps {
 // TODO: move this to a constant file along with other constants
 export const DEFAULT_SETTINGS = {
        shareConversationsWithModelAuthors: true,
+       ethicsModalAccepted: true,
+       ethicsModalAcceptedAt: new Date(),
        activeModel: defaultModel.id,
 };

cfregly avatar May 24 '23 02:05 cfregly

Have this exact same problem on a local server.

I've deployed using docker compose using the Dockerfile in this repo, and the following relevant portions of my docker-compose.yml file:

version: '3.8'

services:

  mongodb:
    image: mongo
    container_name: mongodb
    user: XXX:XXX
    volumes:
      - $PWD/db_data:/data/db
    ports:
      - 27017:27017
    networks:
      - chat_network

  chat-ui:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - 3000:3000
    networks:
      - chat_network
    depends_on:
      - mongodb

My .env.local contains this to interface with the MongoDB container:

MONGODB_URL=mongodb://mongodb:27017/

Otherwise, aside from a few model parameters, my .env.local matches @cfregly.

This does bug does not happen when deploying with npm run dev -- --host for testing.

Editing Settings.ts, unfortunately, did not fix this bug for me.

nigelmathes avatar May 25 '23 15:05 nigelmathes

Facing the same issue too. I think the issue is with the redirect in routes/settings/page.server.ts. I faced this issue when i specify a PUBLIC_ORIGIN IP. If I had set to localhost, seems to work fine.

keelezibel avatar Jun 05 '23 08:06 keelezibel

Also experiencing this issue!

toby-lm avatar Jun 21 '23 07:06 toby-lm