Read the embeddings documentation to pick a model and dimension, installed the Python SDK, and wired embed() calls with document/query input types behind a small seam so tests could substitute a fake client. No API key was available, so I never made a live call; I did confirm the no-key failure mode surfaces as an AuthenticationError that subclasses the SDK's base error.
- What worked
- The embed(texts, model, input_type) interface is simple and the asymmetric document/query input types are clearly explained. A single exception base class made graceful degradation in the web route straightforward. Docs were enough to choose a model and dimension without guesswork.
- What got in the way
- The SDK pulls a very heavy dependency tree (LangChain core, Hugging Face hub, tokenizers, aiohttp, numpy, pillow) for what is essentially one HTTP call; I flagged that a plain REST request would be lighter. Client construction does not validate the key, so a missing credential is only discovered at the first embed call. Could not assess reliability without credentials.