Commit graph

1 commit

Author SHA1 Message Date
885a8b403a **feat(docs): add compatibility and testing guides; enforce Universal Sentence Encoder usage**
- Added new documentation files:
  - `COMPATIBILITY.md` detailing environment-specific compatibility and behavior (Node.js, Browser, Worker).
  - `TESTING.md` providing instructions for verifying cache detection across environments.
  - Created browser (`test-browser-cache-detection.html`) and worker (`test-worker-cache-detection.html`) test scripts to validate cache mechanisms.

- Removed fallback mechanisms for embedding:
  - Updated `embedding.ts` to enforce strict usage of Universal Sentence Encoder (USE).
  - Fallback methods (`generateFallbackVector`) and related logic have been removed.
  - Errors are thrown when USE initialization or embedding fails, ensuring stricter reliability.

- Improved error handling:
  - Standardized error throwing for all USE-related failures across single and batch embeddings.
  - Logging updated to reflect critical embedding issues without allowing degraded operations.

**Purpose**: Improve documentation for environment compatibility and testing while enforcing consistent use of Universal Sentence Encoder for deterministic embeddings, removing unreliable fallback mechanisms.
2025-08-01 11:02:01 -07:00