JevMade

Sign in
← Back to guides

JevMade field notes / Written article

Get started with Jev in Python

A lost-property question at a station desk becomes a Python lesson in understanding a visitor's reply and choosing where to send them with Jev.

Original by Philipp AcsanyGetting started

Listen to this guide

JevMade’s plain-English explanation

0:00 /

Our summary

Type anything but Y or N into Philipp Acsany's first Python script and the station desk cannot help you. His tutorial replaces that rigid check with a question to Jev through OpenRouter, then adds support for several kinds of request.

Even a simple yes goes wrong at first. The script asks whether the visitor lost something without including the question they answered, scoring 0.31. Asking whether the reply is affirmative scores 0.98. Later, one call asks for a desk, urgency and staff assistance together.

The script must still act on those answers; Jev does not send the visitor anywhere. Describe the desks and urgency levels, and ask again about unclear replies. You need Python 3.10 or later and OpenRouter credit. These are example runs, so your answers can differ.

Key takeaways

  1. Include the question behind a reply like yes, or ask the narrower question of whether the reply is affirmative.
  2. Offer a general-information destination for requests that fit none of the specific desks.
  3. Keep the key out of the script. Send an OpenRouter key to OpenRouter's address, not TypeSafe's own address.

This covers Real Python's written tutorial, separate from its video course. September 24 is an update date; the original publication date was not established. The example probabilities do not measure station-routing accuracy.

Real Python

Read the original guide Opens the author’s site in a new tab.

Keep this for later

Sign in to bookmark experiments, guides and videos, and keep notes only you can see.

Continue to sign in

We’ll bring you back to this listing.