Safely connect LLMs to customer code.
Riza lets you run untrusted code from multiple customers
in a secure sandbox embedded inside your generative AI application.
Sally has 17 apples. She gives 9 to Jim. Later that day, Peter gives 6 Bananas to Sally. How many pieces of fruit does Sally have at the end of the day?
1# When using an LLM, you can describe functions and have the
2# model intelligently choose to output a JSON object
3# containing arguments to call one or many functions.
4#
5# In this example, we give the model the ability to do
6# simple addition and subtraction.
7
8def addition(a, b):
9 """Add two numbers together."""
10 return a + b
11
12def subtraction(a, b):
13 """Subtract one number from another."""
14 return a - b
15
At the end of the day Sally has 14 pieces of fruit.