We have developed a library of methods (around 50 functions/methods) on top of node.js
We use this library to write short snippets of code to perform a certain task. One example of such a task is this:
Read the user's name, mobile number and email id from the session data and write this information in a google sheet as a new entry.
For getting this task done using ChatGPT, we give the user guide of our library which contains description of functions, syntax of functions, usage example of functions and expected output from those methods/functions. Now as a prompt, we ask chatGPT to read this documentation and write a code to “Read the user's name, mobile number and email id from the session data and write this information in a google sheet as a new entry.
”
Now instead of using our custom library of functions to write this code, chatGPT writes a generic node.js code to perform this task. ChatGPT assumes that there is a variable called session and it writes a function to read data from session and the it calls google library functions and writes a new method to write data in google sheet.
How can we prompt the chatGPT to use available functions from our library only and write a custom method only if the related method is not found in our library?