|
|
|
|
|
by ilaksh
732 days ago
|
|
I think that yes, there is a better way. You have a function that calls the API, then take the output and call another function that calls the API, inserting the first output into the second one's prompt using an f-string or whatever. You can have a helper function that has defaults for model params or something. You don't need an abstraction at all really. Inserting the previous output into the new prompt is one line of code, and calling the API is another line of code. If you really feel like you need to abstract that then you can make an additional helper function. But often you want to do different things at each stage so that doesn't really help. |
|