Getting one line of code only
Closed this issue · 4 comments
I removed the new line in 'stop': ['\n'],
, but still getting only one line of code.
Example whan I prompt it to write a function to check if a number is odd or not, it only gives:
def odd_even(n):
What could the issue?
@turinaf try replacing that '\n' with some random string or try increasing max tokens.
I removed the new line in
'stop': ['\n'],
, but still getting only one line of code.Example whan I prompt it to write a function to check if a number is odd or not, it only gives:
def odd_even(n):
What could the issue?
u should replace \n in stop with # and it's gonna work , good luck
As per the last line of the readme, "In order to build a complete code snippet, iteratively append the generated code to the prompt and send it back to the API until the response is empty". That's the most effective way to generate large blocks of code - any other stop terminators may prematurely terminate if they appear natively in the output.
Ok, thank you all.