Skip to content

Glossary: AI App Interfaces

Context manager

Also written: with block

An object used with `with` that sets something up and cleans up afterward. Anthropic's `messages.stream` closes the connection when the `with` block ends.

Where the book teaches it

Related terms

Anthropic SDK