huggingface / chat-ui

Open source codebase powering the HuggingChat app
https://huggingface.co/chat
Apache License 2.0
7.37k stars 1.07k forks source link

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

Open cfregly opened 1 year ago

cfregly commented 1 year ago
image

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

cfregly commented 1 year ago
image
nsarrazin commented 1 year ago

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

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

cfregly commented 1 year ago

COOKIE_NAME=hf-chat

HF_ACCESSTOKEN=#hf 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 commented 1 year ago

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,
 };
nigelmathes commented 1 year ago

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.

keelezibel commented 1 year ago

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.

toby-lm commented 1 year ago

Also experiencing this issue!