Tools like Github Copilot can generate/complete code and/or comments while typing within an IDE. It looks like they are limited to this use case.
However, I actually want to something similar to the following in any Python program:
import coolcopilotpackage as cop
comment = cop.generate("print('Hello World!') #")
print(comment)
The output should be looking like: Prints the line 'Hello World!'
, completing the line of code that I started within the string given to cop.generate
.
Is there any way of doing that?