Skip to content

add offline mode with lazy model loading#122

Open
Sasyamerugu wants to merge 1 commit intosugarlabs:mainfrom
Sasyamerugu:offline-fallback-mode
Open

add offline mode with lazy model loading#122
Sasyamerugu wants to merge 1 commit intosugarlabs:mainfrom
Sasyamerugu:offline-fallback-mode

Conversation

@Sasyamerugu
Copy link
Copy Markdown

Introduce an OFFLINE_MODE flag to allow the system to run without invoking the LLM, returning retrieval-based responses instead. This enables usage in low-connectivity environments.

Move model initialization from startup to runtime (lazy loading) to prevent server startup failures when the model cannot be loaded.

Handle empty document sets safely by skipping vector store initialization, avoiding crashes during FAISS setup.

Allow direct LLM responses when no documents are available in online mode, ensuring the system remains functional without RAG context.

Introduce an OFFLINE_MODE flag to allow the system to run without invoking
the LLM, returning retrieval-based responses instead. This enables usage
in low-connectivity environments.

Move model initialization from startup to runtime (lazy loading) to prevent
server startup failures when the model cannot be loaded.

Handle empty document sets safely by skipping vector store initialization,
avoiding crashes during FAISS setup.

Allow direct LLM responses when no documents are available in online mode,
ensuring the system remains functional without RAG context.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant