Recently, I came across a webinar where the presenter was invoking custom functions from the Co-pilot VS Code extension. The functions were getting invoked based on the content of the prompt, and these functions had connectivity to external systems via REST. Some of the functions even had connectivity with the Database. For example, if I have a function defined like this:
def calculate_area(length, width):
"""Calculates the area of a rectangle."""
return length * width
def generate_report(data):
"""Generates a detailed report from given data."""
# ... intricate report generation logic ...
How can I make Co-pilot to invoke above functions and return/render the response?
I am aware that functions can be called from LLMs similar to what is described here.
How can I achieve the same via Co-Pilot?