Cheapest GPT-4 Turbo, GPT 4 Vision, ChatGPT OpenAI AI API

פרמיום
על ידי NextAPI | מְעוּדכָּן 23日前 | Artificial Intelligence/Machine Learning
פּוֹפּוּלָרִיוּת

9.8 / 10

חֶבִיוֹן

195ms

רמת שירות

100%

Health Check

100%

חזרה לכל הדיונים

Finish reason: length

Rapid account: Paywithcode
paywithcode
1ヶ月前

Greetings!
i am working with this paramethers:

    "role"=>"user",

    "model"=>"gpt-4-turbo-2024-04-09",
    "max_tokens"=> 100,
    "temperature"=>0.9

but i getting answer that contains 370-400 chars and finish reason - length.

What should i change to get a bigger answer?

Rapid account: Next API
NextAPI Commented 1ヶ月前

Hey there,

Glad you figured out the answer. Yes that is correct, the “max_tokens” object is similar to words, it limits how many words GPT-4 can reply with. If you increase it you can use it to generate longer answers.

If you do have any other questions feel free to message us!

Best regards,
The NextAPI Team

Rapid account: Paywithcode
paywithcode Commented 1ヶ月前

max_tokens 500 is better. sorry for disturbing)

הצטרף לדיון - הוסף תגובה למטה:

התחבר / הירשם כדי לפרסם תגובות חדשות