Assignment: annotate one request
Prerequisite: read the lesson and build the pinned app. Open data/AndroidEngineersGuide.kt, data/Models.kt, and the debug data/GeminiChatService.kt.
- Write a harmless first question: “I know Kotlin and want to learn Compose.” Follow it with “Which practical exercise should I try?”
- Draw the system instruction and three context parts expected on the second successful request: first user message, completed model reply, latest user message.
- Compare your drawing with the
contentsconstruction in the transport. Do not add logging of keys or raw conversations to the app. - Run the existing transport test, which inspects a controlled request body:
./gradlew :app:testDebugUnitTest --tests '*GeminiChatServiceTest.transportSendsContextAndStreamsText'
Predict what changes if you stop the first reply halfway through. The partial answer remains visible locally, but that incomplete turn is excluded from the next request. The test's canned “Hello” response is not live Gemini evidence.
Submit an annotated request diagram and a table distinguishing pretrained knowledge, supplied context, and unavailable data. Explain why a directory link is not a course-content search result. If cloud access is unavailable, use controlled test data and explicitly mark the live comparison unverified.