danny-avila / LibreChat

Enhanced ChatGPT Clone: Features Anthropic, OpenAI, Assistants API, Azure, Groq, GPT-4 Vision, Mistral, OpenRouter, Vertex AI, Gemini, AI model switching, message search, langchain, DALL-E-3, ChatGPT Plugins, OpenAI Functions, Secure Multi-User System, Presets, completely open-source for self-hosting. Actively in public development.
https://librechat.ai/
MIT License
16.9k stars 2.82k forks source link

[Bug]: A MeiliSearch error log is generated when the first message is sent after server start #1423

Closed myxgenius closed 8 months ago

myxgenius commented 8 months ago

What happened?

After starting the server, the first user message will trigger an error log:

LibreChat | 2023-12-23 21:04:05 error: [MeiliMongooseModel.findOneAndUpdate] Convo not found in MeiliSearch and will index f4dad427-008a-4f11-98dd-84faf948032b Document f4dad427-008a-4f11-98dd-84faf948032b not found.

It doesn't have any perceivable effect on the user side.

Steps to Reproduce

  1. docker compose up
  2. open the UI and send a new message to google gemini in a new conversation
  3. The command line will show a red log line as pasted below.

.env: DEBUG_LOGGING=true DEBUG_CONSOLE=true

Not sure if this only reproduce on gemini or on openai as well.

What browsers are you seeing the problem on?

No response

Relevant log output

LibreChat         | 2023-12-23 21:04:04 debug: [AskController]
LibreChat         | 2023-12-23 21:04:05 debug: [BaseClient] Loading history:
LibreChat         | 2023-12-23 21:04:05 debug: [GoogleClient] buildMessages
chat-meilisearch  | [2023-12-23T21:04:05Z INFO  actix_web::middleware::logger] 172.20.0.4 "POST /indexes/messages/documents HTTP/1.1" 202 137 "-" "undici" 0.017097
chat-meilisearch  | [2023-12-23T21:04:05Z INFO  actix_web::middleware::logger] 172.20.0.4 "GET /indexes/convos/documents/f4dad427-008a-4f11-98dd-84faf948032b HTTP/1.1" 404 189 "-" "undici" 0.007929
LibreChat         | 2023-12-23 21:04:05 error: [MeiliMongooseModel.findOneAndUpdate] Convo not found in MeiliSearch and will index f4dad427-008a-4f11-98dd-84faf948032b Document `f4dad427-008a-4f11-98dd-84faf948032b` not found.
chat-meilisearch  | [2023-12-23T21:04:05Z INFO  actix_web::middleware::logger] 172.20.0.4 "POST /indexes/convos/documents HTTP/1.1" 202 135 "-" "undici" 0.022409

Screenshots

No response

Code of Conduct

danny-avila commented 8 months ago

Not a bug. This is normal behavior, i can flag it as a non-error to avoid any confusion

Fakamoto commented 6 months ago

@danny-avila Mind giving an explanation on why is this expected before closing the issue? what to do to prevent this expected error?