Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions node/prompt-chatgpt/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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 |
| ------------- | ------------------------------------------------------------------------------------------------------------- |
Expand Down
4 changes: 2 additions & 2 deletions node/prompt-chatgpt/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions php/prompt-chatgpt/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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 |
| ------------- | ------------------------------------------------------------------------------------------------------------- |
Expand Down
4 changes: 2 additions & 2 deletions php/prompt-chatgpt/src/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']]
],
Expand Down
4 changes: 2 additions & 2 deletions python/prompt_chatgpt/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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 |
| ------------- | ------------------------------------------------------------------------------------------------------------- |
Expand Down
4 changes: 2 additions & 2 deletions python/prompt_chatgpt/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down