diff --git a/node/prompt-chatgpt/README.md b/node/prompt-chatgpt/README.md index 47e3654d..ed22b4c0 100644 --- a/node/prompt-chatgpt/README.md +++ b/node/prompt-chatgpt/README.md @@ -1,6 +1,6 @@ # 🤖 Node Prompt ChatGPT Function -Ask question, and let OpenAI GPT-3.5-turbo answer. +Ask question, and let OpenAI GPT-5.6-terra answer. ## 🧰 Usage @@ -76,7 +76,7 @@ A unique key used to authenticate with the OpenAI API. Please note that this is ### OPENAI_MAX_TOKENS -The maximum number of tokens that the OpenAI response should contain. Be aware that OpenAI models read and write a maximum number of tokens per API call, which varies depending on the model. For GPT-3.5-turbo, the limit is 4096 tokens. +The maximum number of tokens that the OpenAI response should contain. Be aware that OpenAI models read and write a maximum number of tokens per API call, which varies depending on the model. With GPT-5.x models, this limit includes reasoning tokens. | Question | Answer | | ------------- | ------------------------------------------------------------------------------------------------------------- | diff --git a/node/prompt-chatgpt/src/main.js b/node/prompt-chatgpt/src/main.js index d6bb4456..f5240fbb 100644 --- a/node/prompt-chatgpt/src/main.js +++ b/node/prompt-chatgpt/src/main.js @@ -20,8 +20,8 @@ export default async ({ req, res }) => { try { const response = await openai.chat.completions.create({ - model: 'gpt-3.5-turbo', - max_tokens: parseInt(process.env.OPENAI_MAX_TOKENS ?? '512'), + model: 'gpt-5.6-terra', + max_completion_tokens: parseInt(process.env.OPENAI_MAX_TOKENS ?? '512'), messages: [{ role: 'user', content: req.bodyJson.prompt }], }); const completion = response.choices[0].message.content; diff --git a/php/prompt-chatgpt/README.md b/php/prompt-chatgpt/README.md index 5f58ba59..11ab6cbc 100644 --- a/php/prompt-chatgpt/README.md +++ b/php/prompt-chatgpt/README.md @@ -1,6 +1,6 @@ # 🤖 PHP Prompt ChatGPT Function -Ask question, and let OpenAI GPT-3.5-turbo answer. +Ask question, and let OpenAI GPT-5.6-terra answer. ## 🧰 Usage @@ -76,7 +76,7 @@ A unique key used to authenticate with the OpenAI API. Please note that this is ### OPENAI_MAX_TOKENS -The maximum number of tokens that the OpenAI response should contain. Be aware that OpenAI models read and write a maximum number of tokens per API call, which varies depending on the model. For GPT-3.5-turbo, the limit is 4096 tokens. +The maximum number of tokens that the OpenAI response should contain. Be aware that OpenAI models read and write a maximum number of tokens per API call, which varies depending on the model. With GPT-5.x models, this limit includes reasoning tokens. | Question | Answer | | ------------- | ------------------------------------------------------------------------------------------------------------- | diff --git a/php/prompt-chatgpt/src/index.php b/php/prompt-chatgpt/src/index.php index a930c3b4..8d33b25e 100644 --- a/php/prompt-chatgpt/src/index.php +++ b/php/prompt-chatgpt/src/index.php @@ -22,8 +22,8 @@ try { $response = $openai->chat()->create([ - 'model' => 'gpt-3.5-turbo', - 'max_tokens' => $_ENV['MAX_TOKENS'] ?: 150, + 'model' => 'gpt-5.6-terra', + 'max_completion_tokens' => (int) ($_ENV['OPENAI_MAX_TOKENS'] ?? $_ENV['MAX_TOKENS'] ?? 0) ?: 512, 'messages' => [ ['role' => 'user', 'content' => $context->req->bodyJson['prompt']] ], diff --git a/python/prompt_chatgpt/README.md b/python/prompt_chatgpt/README.md index 96c987a1..a78160a0 100644 --- a/python/prompt_chatgpt/README.md +++ b/python/prompt_chatgpt/README.md @@ -1,6 +1,6 @@ # 🤖 Python Prompt ChatGPT Function -Ask question, and let OpenAI GPT-3.5-turbo answer. +Ask question, and let OpenAI GPT-5.6-terra answer. ## 🧰 Usage @@ -76,7 +76,7 @@ A unique key used to authenticate with the OpenAI API. Please note that this is ### OPENAI_MAX_TOKENS -The maximum number of tokens that the OpenAI response should contain. Be aware that OpenAI models read and write a maximum number of tokens per API call, which varies depending on the model. For GPT-3.5-turbo, the limit is 4096 tokens. +The maximum number of tokens that the OpenAI response should contain. Be aware that OpenAI models read and write a maximum number of tokens per API call, which varies depending on the model. With GPT-5.x models, this limit includes reasoning tokens. | Question | Answer | | ------------- | ------------------------------------------------------------------------------------------------------------- | diff --git a/python/prompt_chatgpt/src/main.py b/python/prompt_chatgpt/src/main.py index 3cb15e2f..1b1f95f3 100644 --- a/python/prompt_chatgpt/src/main.py +++ b/python/prompt_chatgpt/src/main.py @@ -24,8 +24,8 @@ def main(context): try: response = openai.ChatCompletion.create( - model="gpt-3.5-turbo", - max_tokens=int(os.environ.get("OPENAI_MAX_TOKENS", "512")), + model="gpt-5.6-terra", + max_completion_tokens=int(os.environ.get("OPENAI_MAX_TOKENS", "512")), messages=[{"role": "user", "content": context.req.body["prompt"]}], ) completion = response.choices[0].message.content