microsoft / TypeChat

TypeChat is a library that makes it easy to build natural language interfaces using types.
https://microsoft.github.io/TypeChat/
MIT License
8.06k stars 379 forks source link

Python: Add music player example #158

Closed hillary-mutisya closed 6 months ago

hillary-mutisya commented 6 months ago

This change adds a music player example to the python typechat implementation. Unlike the typescript edition, this example does not rely on JsonProgram. Instead, the music player schema is exposed as a set of actions (and their corresponding parameter types). The model selects a sequence of actions to run. These are passed to a handler function that executes them in order.

The code is organized as follows: