max_completion_tokens is not affective
Closed this issue · 0 comments
hopewise commented
Describe the bug
I am trying to set max tokens received while using assistant API, I tried to max_completion_tokens: 500, as:
run_response = client.runs.create(
thread_id: thread_id,
parameters: {
max_completion_tokens: 500,
assistant_id: ENV['OPENAI_ASSISTANT_ID'],
additional_instructions: system_message + "\n\n",
stream: proc do |chunk, _bytesize|
...
Expected behavior
Precise response.
Actual behavior
Too long response.