Not having access to GPT4 via API, and also trying to limit cost, I'm trying to use ChatGPT Plus to run this.
https://github.com/acheong08/ChatGPT-to-API offers a simple solution for this, and works great.
But the output files contain extraneous "chat-ey" text. For example:
"Here's the code for the file pi_digits.py that returns the first 100 digits of pi, backwards:
import math
def get_pi_digits():
pi = str(math.pi)
pi_digits = pi[:1:-1]
return pi_digits[:100]
print(get_pi_digits())
This code imports the math module, defines a function get_pi_digits() that calculates the value of pi and retrieves the first 100 digits in reverse order. Finally, it prints the result using the print() function.
"
So close to code! Trying to find a modified prompt or system prompts to get ChatGPT to act like OpenAI API.
(Off-topic: Yes, I know its code output won't spit out 100 digits. It's my favorite LLM code challenge. GPT4 will code it right, and I'm hoping debug.py will get it there.)
Not having access to GPT4 via API, and also trying to limit cost, I'm trying to use ChatGPT Plus to run this. https://github.com/acheong08/ChatGPT-to-API offers a simple solution for this, and works great. But the output files contain extraneous "chat-ey" text. For example:
"Here's the code for the file pi_digits.py that returns the first 100 digits of pi, backwards:
This code imports the
math
module, defines a functionget_pi_digits()
that calculates the value of pi and retrieves the first 100 digits in reverse order. Finally, it prints the result using theprint()
function. "So close to code! Trying to find a modified prompt or system prompts to get ChatGPT to act like OpenAI API.
(Off-topic: Yes, I know its code output won't spit out 100 digits. It's my favorite LLM code challenge. GPT4 will code it right, and I'm hoping debug.py will get it there.)