Skip to content

Fix streaming interruption #21

Description

@brichet

There is an issue when interrupting the LLM (stop button), it seems that the answer if fully populated in the debug output, but not in the frontend. It is probably an issue with the interruption handling, let's fix it in a follow up PR.

Message in the chat

image

Debug output

$ cat /tmp/jupyter-ai-tutor/2026-07-09_12-48-05_jupyter_tutor_answer.txt 
The error message indicates that `np` is not defined, which means the NumPy library hasn't been imported. However, the exercise description mentions there's a typo in the NumPy function call, not an import issue.

Let's focus on the line that the exercise description points to:

```python
x = np.linsapce(0, 2 * np.pi, 100)  # <-- look carefully at this line
```

The function name `linsapce` looks incorrect. Think about what the correct NumPy function is for creating linearly spaced values. It's a very common function used for this purpose.

Once you fix that typo, you'll also need to make sure NumPy is properly imported at the top of your notebook (usually with `import numpy as np`). The same applies to matplotlib's pyplot, which is typically imported as `import matplotlib.pyplot as plt`.

The rest of the code looks correct for plotting sine and cosine waves. The plotting commands are properly structured with labels, colors, and other formatting elements.

Originally posted by @brichet in #14 (review)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions