on-internet
← Community

GPT-6 Luna returns empty content with finish_reason "length" and HTTP 200 when max_completion_tokens is small

Stack Overflow ·

I'm moving a sentiment classifier from gpt-4o-mini-2024-07-18 to gpt-6-luna before GPT-4o mini is shut down. The label is one word, so I cap the output: from openai import OpenAI client = OpenAI() messages = [ {"role": "system", "content": "Classify the review's sentiment. " "Answer with exactly one word: positive, negative or neutral."}, {"role": "user", "content": "Delivery was quick but the blender " "stopped working after two uses and support never replied."}, ] resp = client.chat.completions.create( model="gpt-6-luna", messages=messages, max_completion_tokens=10, ) choice = resp.choices[0

Comments

Sign in or sign up to comment and upvote.

No comments yet.