aitok-ai / LibreChat

Enhanced ChatGPT Clone: Features OpenAI, Bing, PaLM 2, AI model switching, message search, langchain, Plugins, Multi-User System, Presets, completely open-source for self-hosting. More features in development
https://discord.gg/CEe6vDg9Ky
MIT License
3 stars 1 forks source link

Lijing: Merge Latest Main from Upstream #199

Closed jinzishuai closed 4 months ago

aws-amplify-ap-east-1[bot] commented 4 months ago

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-199.d35bsvaicfsnob.amplifyapp.com

jinzishuai commented 4 months ago

Testing Locally After https://github.com/aitok-ai/LibreChat/pull/200 is Merged Using test.aitok.ai MongoDB

With mongodb+srv://jinzishuai:<Pass>@librechat.gfu3hjs.mongodb.net/LibreChat

╭─    ~/src/aitok/LibreChat    jinshi/test-pr-199 *2 ?2 · 1 ✘  31s   base   teleport-dev-dev.aws.241560502194.us-east-2.controlplane 󱃾  18:01:38  
╰─ npm run backend

> LibreChat@0.7.2 backend
> cross-env NODE_ENV=production node api/server/index.js

2024-05-21 18:04:02 info: [Optional] Redis not initialized. Note: Redis support is experimental.
2024-05-21 18:04:03 info: Starting Agenda...
(node:51529) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
2024-05-21 18:04:03 warn: Meilisearch error, search will be disabled
2024-05-21 18:04:06 info: Connected to MongoDB
2024-05-21 18:04:06 error: Config file YAML format is invalid: ENOENT: no such file or directory, open '/Users/shijin/src/aitok/LibreChat/librechat.yaml'
2024-05-21 18:04:06 warn: Default value for CREDS_KEY is being used.
2024-05-21 18:04:06 warn: Default value for CREDS_IV is being used.
2024-05-21 18:04:06 info: Please replace any default secret values.
2024-05-21 18:04:06 info: ​

    For your convenience, use this tool to generate your own secret values:
    https://www.librechat.ai/toolkit/creds_generator

    ​
2024-05-21 18:04:06 warn: The `GOOGLE_API_KEY` environment variable is deprecated.
Please use the `GOOGLE_SEARCH_API_KEY` environment variable instead.
2024-05-21 18:04:06 warn: RAG API is either not running or not reachable at undefined, you may experience errors with file uploads.
2024-05-21 18:04:06 info: Server listening on all interfaces at port 3080. Use http://localhost:3080 to access it
2024-05-21 18:04:06 info: Agenda successfully started and connected to MongoDB.
jinzishuai commented 4 months ago

Note about missing librechat.yaml file

We are moving from .env file to the librecht.yaml but it is not required right now. So we'll deal with this at a later time.

jinzishuai commented 4 months ago

Testing at http://localhost:3080

jinzishuai commented 4 months ago

Problem: when quota is hit, the original error is not shown

image

The server log shows the error:

2024-05-21 18:12:13 error: [handleAbortError] AI response error; aborting request: 超出了您的使用额度(gpt-4o模型每30天0条消息)。由于需要支付越来越多、每月上万元的API费用,如果您经常使用我们的服务,请打开“我的主页”进行购买,支持我们持续提供GPT服务

This is because a better error handling framework has been introduced in the latest upstream code. We'll have to adjust to use that. In the same time, this is also a good opportunity to handle this error properly with specific error message shown in the web UI in the correct language.

jinzishuai commented 4 months ago

Conclusion: No breaking changes. We should feel comfortable to merge

We can follow up with the following two issues