try:
completion = client.chat.completions.create(
model="gpt-4o-mini", # Or "gpt-4" if your key supports it
messages=[
{"role": "system", "content": system_prompt},
{"role": "user", "content": user_prompt},
],
max_tokens=100,
temperature=0.8
)
print(completion.choices[0].message["content"].strip())
except OpenAIError as e:
return f"OpenAI API error: {e}"
except Exception as e:
return f"Unexpected error: {e}"
i dont see where the problem is i looked at someone else having the same problem but using print didnt work i dont really need anyone to tell me exactly how to do it but whether or now the problem would lye in here and what call i would use if thats the case or what print i would use im setting it up for of course a response to the users input… any help?