This change adds a simple calculator example which uses JsonProgram for its schema. This is similar to the math example in the typescript implementation. Some changes:
The JsonProgram validator and translator are included in the example folder. We'll evaluate whether to include them in the main typechat python implementation at a later date.
The translator takes an API that exposes the functions a model can call. The example shows two ways of providing this- either as a TypedDict with Callable values (schema.py) or as a Protocol with instance methods (schemaV2.py).
This change adds a simple calculator example which uses JsonProgram for its schema. This is similar to the math example in the typescript implementation. Some changes: