Skip to main content

LibreChat

The feature-rich conversational interface for LibreApps Desktop.

Overview

LibreChat is the primary chat interface integrated into LibreApps Desktop ecosystem. It provides a ChatGPT-like experience with support for multiple AI models, conversation history, and advanced features like file uploads and plugins.

Key Features

  • Multi-Model Support: Switch between different LLMs (via LiteLLM) within the same conversation.
  • Conversation History: Persistent storage of all your chats using MongoDB.
  • Search: Fast, full-text search across your chat history powered by Meilisearch.
  • Custom Presets: Create and save custom system prompts and model configurations.
  • Secure: Integrates with Keycloak for user authentication and the APISIX Gateway for secure routing.

Integration with LibreApps Desktop

LibreApps Desktop uses the Smash AI Chat widget to embed LibreChat capabilities directly into the dashboard. The widget communicates with the LibreChat API, which is routed through the APISIX Gateway.

Configuration

LibreChat is configured via the config/librechat/librechat.yaml file and environment variables:

  • MONGO_URI: Connection string for the MongoDB database.
  • MEILI_HOST: URL of the Meilisearch instance.
  • OPENAI_API_KEY: API key for OpenAI (or LiteLLM proxy URL).

Best Practices

  • Do this: Use custom presets to provide users with pre-configured AI personalities.
  • Do this: Enable Meilisearch to allow users to easily find past conversations.
  • Don't do this: Store sensitive personal information in chat conversations without proper encryption.

Best Practices

  • Do this: Use the conversationId to maintain state across multiple user interactions.
  • Do this: Implement custom prompt templates to tailor the AI's personality and behavior.
  • Don't do this: Send large amounts of unnecessary data in the chat request; keep the payload focused on the conversation.