Skip to content

Chat ​

Build custom chatbots with a just a couple of lines of LMQL.

Building chat applications is one of the most common use cases for LLMs. This is why LMQL provides simple library support for it. This chapter will walk you through the basics of building a chatbot with LMQL Chat including the core loop, output streaming, serving and defending against prompt injections.

Screenshot of the model dropdown in the playground
An overview of the LMQL Chat library.

To get started choose one of the following topics: