Open j0bekt01 opened 4 months ago
Do we require Copilot subscription to get replies when we sent prompt
yes
You can iterate like this:
def copilot_iter(prompt, language='python'):
original = prompt
while True:
result = copilot(prompt, language)
if result == '\n\n':
break
prompt += result
return prompt[len(original) + 1:].replace('\n\n', '\n') + '\n'
Just add that function to the original app.py
and then call it instead of calling copilot()
on line 154:
https://github.com/B00TK1D/copilot-api/blob/27e36477866311ec9501f34b1fd95cb6d5a88e98/api.py#L154
could you show us how to iteratively get a complete code snippet. I've tried many times but only got a first line.