GenerateReqInput object.
Often times you’ll see the type as Omit<GenerateReqInput, 'text' | 'input_ids'> or something
along those lines. This is because the ProgramState handles
creating the prompt for you, so you should never have to pass an input in yourself.
GenerateReqInput
The GenerateReqInput object is a union between two types:
GenerateReqNonStreamingInput
and GenerateReqStreamingInput.
This is because the things you can pass in to streaming and non-streaming requests are
slightly different, but more importantly for better type inference so typescript can tell
what the return type of the .gen function should be.
Both types are slight variations of the GenerateReqInputBase type.
GenerateReqInputBase
GenerateReqInputNonStreaming
choices.
GenerateReqInputStreaming
choices parameter.