I’m trying to learn how to approach the task of converting free-form English descriptions into valid JavaScript functions. For example, I have a design document written in informal English that contains instructions like:
- You receive two parameters. Add them together, divide the result by 2, and check if there is a remainder. If there is a remainder, print it; otherwise, print “No remainder.”
- You receive a structure containing keys. Search for the key named “foo” and print its value. If the key is not found, print “Key not found.”
And so on.
From such descriptions, I need to create simple JavaScript functions. My goal is to figure out how to approach this problem using LangChain. I’m using Azure AI and have a beginner-level understanding of LangChain.
Can anyone guide me on how to get started with this? Any advice or examples would be appreciated.
Thanks!