Skip to main content

Module 2 Quiz

Test your understanding of model-serving engines, the OpenAI-compatible contract, and the wiring patterns from the lesson and lab.

Which of the following model-serving engines expose an OpenAI-compatible `/v1` API? (Select all that apply)

(select all that apply)

Your team builds a Python client against Ollama on a dev laptop. Six months later, operations moves the model to a vLLM server on a GPU VM. Which files must change?

The M1 lab called Ollama's `/api/generate` endpoint. The M2 lab switches to `/v1/chat/completions`. What is the key structural difference in the response?

Pattern A (Mac / Apple Silicon) reaches Ollama via `http://host.docker.internal:11434`. Pattern B (Windows + NVIDIA GPU) uses `http://ollama:11434`. What accounts for the different hostname?

In `client.py`, the `openai` SDK is initialized with `api_key="ollama"`. Why is a non-empty dummy value required even though Ollama never validates API keys?