lamp.
ResourcesPricingAbout

Function calling

Function calling is a method by which an AI model requests that a defined function in your software be run, with specific inputs, and then uses the returned result.

What it means

The model cannot look up your stock or post an entry by itself. It is given a list of functions, for example "get customer balance" with a customer code input. When needed it replies with the function name and values; your system runs it, checks the inputs and passes back the answer. This keeps real actions under your control. The model only proposes; the surrounding software decides whether to run.

Example

A hardware distributor's assistant is asked, "What does Sharma Traders owe?" It requests the balance function with customer code C-218, receives ₹84,500, and states that figure in its reply.

Records and checks

  • Record each call: function, inputs, result, caller and time.
  • Verify that inputs are checked for validity before the function runs.
  • The system owner approves which functions the model may call, and keeps write actions to a minimum.

Common mistakes

  • Exposing a function that changes records without a limit or approval.
  • Trusting the model's inputs, such as an amount, without validating them.
Did not find your answer?Message the lamp team on WhatsApp. Ask about setup, your records, or anything we have not covered here.Ask us on WhatsApp →