cogentapps / chat-with-gpt

An open-source ChatGPT app with a voice
https://www.chatwithgpt.ai
MIT License
2.31k stars 494 forks source link

Config.yaml not recognized #190

Open loranger opened 11 months ago

loranger commented 11 months ago

Hi,

My config.yaml is provided, with the correct values

config.yaml ``` services: openai: apiKey: sk-sFxxxxxxxxxxxxxxxxxxhiddenxxxxxxxxxxxxxxxx elevenlabs: apiKey: 83cxxxxxxxxxhiddenxxxxxxxxx ```

and even if the docker image says it's loaded

chatgpt-chat-1  |
chatgpt-chat-1  | > chat-with-gpt@0.2.3 start
chatgpt-chat-1  | > npx ts-node --logError src/index.ts
chatgpt-chat-1  |
chatgpt-chat-1  | Loaded config from: /app/data/config.yaml
chatgpt-chat-1  | Configuring Passport.
chatgpt-chat-1  | Initializing database adapter for sqlite3.
chatgpt-chat-1  | Open http://localhost:3000 in your browser.

The frontend considers I set no key

SCR-20231017-qgjc

What did I miss? Could you help, please?

ve7mjc commented 11 months ago

It did the same for me - claiming to have loaded the config file but seemingly ignoring the API key. The following worked for me.

Taking a peek at the code (config.ts) it looks like it is also expecting a yaml key below it called "loginRequired: true|false"

Give this a shot:

services:
    openai:
        apiKey: sk-sFxxxxxxxxxxxxxxxxxxhiddenxxxxxxxxxxxxxxxx
        loginRequired: false
    elevenlabs:
        apiKey: 83cxxxxxxxxxhiddenxxxxxxxxx