#Hi I m brand new to the server so not

1 messages · Page 1 of 1 (latest)

eternal pawn
#

@timid igloo
If I understand you right, you might want to have a look at OpneAI function calls for structured JSON output. Make sure to include a required field for mandatory params.

timid igloo
timid igloo
#

I tried implementing this following the documentation but I get stuck in this function

def generate_post():
# Call GPT API to get the post content
response = openai.ChatCompletion.create(
model='gpt-3.5-turbo', # or 'gpt-4' if available
messages=[instruction],
functions=custom_functions
)

It gives me an invalid requests error. What is missing?

eternal pawn