Skip to content

Commit d07191f

Browse files
committed
Update OpenAI model from GPT-4 to GPT-5-nano
Updated all references across the codebase: - README.md: Updated model references in documentation - src/functions.py: Updated model name in generate_response function - templates/index.html: Updated UI text - templates/post.html: Updated UI text
1 parent bc90f42 commit d07191f

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[![Schedule](https://img.shields.io/badge/schedule-v1.2.1-blue)](https://schedule.readthedocs.io/en/stable/)
1010
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
1111

12-
Automate your Twitter presence. Auto Post tweets from from openAI GPT4, from a file, from a string, schedule a new tweet to be posted daily or post the tweet instantly.
12+
Automate your Twitter presence. Auto Post tweets from from openAI GPT-5-nano, from a file, from a string, schedule a new tweet to be posted daily or post the tweet instantly.
1313
</div>
1414

1515
---
@@ -21,12 +21,12 @@ This Python-based Twitter Auto-Post Bot automates tweeting, Credit to the Tweepy
2121
### 📁 Files Overview
2222
#### Using OpenAI
2323
##### Instantly:
24-
- `src/instantly-tweet-from-openai.py`: Immediately tweets a tweet from openAI api response, currently using GPT4, but you can change the model in [functions.py](https://github.com/lewispour/Twitter-auto-Post-Bot---X.com---Tweepy-python-bot/blob/main/src/functions.py#L21)
24+
- `src/instantly-tweet-from-openai.py`: Immediately tweets a tweet from openAI api response, currently using GPT-5-nano, but you can change the model in [functions.py](https://github.com/lewispour/Twitter-auto-Post-Bot---X.com---Tweepy-python-bot/blob/main/src/functions.py#L21)
2525

2626
- ###### Prompt defined [here](https://github.com/lewispour/Twitter-auto-Post-Bot---X.com---Tweepy-python-bot/blob/main/src/instantly-tweet-from-openai.py#L7)
2727

2828
##### Schedule to auto post, tweet daily at a time:
29-
- `src/schedule-daily-post-from-openai.py`: Automates daily tweets, Runs daily at a scheduled time and queries open ai api to create a tweet, the tweet returned is then automatically tweeted each day to fully automate twitter on auto pilot. By default the model is OPENAI GPT4 but you can change the model in [functions.py](https://github.com/lewispour/Twitter-auto-Post-Bot---X.com---Tweepy-python-bot/blob/main/src/functions.py#L21).
29+
- `src/schedule-daily-post-from-openai.py`: Automates daily tweets, Runs daily at a scheduled time and queries open ai api to create a tweet, the tweet returned is then automatically tweeted each day to fully automate twitter on auto pilot. By default the model is OPENAI GPT-5-nano but you can change the model in [functions.py](https://github.com/lewispour/Twitter-auto-Post-Bot---X.com---Tweepy-python-bot/blob/main/src/functions.py#L21).
3030
- ###### Prompt defined [here](https://github.com/lewispour/Twitter-auto-Post-Bot---X.com---Tweepy-python-bot/blob/main/src/schedule-daily-post-from-openai.py#L12)
3131
- ###### Schedule time defined [here](https://github.com/lewispour/Twitter-auto-Post-Bot---X.com---Tweepy-python-bot/blob/main/src/schedule-daily-post-from-openai.py#L20)
3232

@@ -124,7 +124,7 @@ Your browser should automatically open, or you can manually navigate to the URL.
124124
- Monitor scheduled jobs
125125

126126
#### Post Tweet
127-
- **AI-Generated Tweets**: Generate tweets using OpenAI's GPT-4 with custom prompts
127+
- **AI-Generated Tweets**: Generate tweets using OpenAI's GPT-5-nano with custom prompts
128128
- **Random from File**: Post a random tweet from your tweets.txt library
129129
- **Custom Tweet**: Write and post your own tweet with character counter
130130

src/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def get_formatted_date():
1818

1919
def generate_response(prompt):
2020
client = OpenAI(api_key=keys.openai_key)
21-
model = "gpt-4-1106-preview"
21+
model = "gpt-5-nano"
2222
messages = [
2323
{"role": "system", "content": "You are a helpful assistant."},
2424
{"role": "user", "content": prompt}

templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ <h1 class="mb-4">
9898
<div class="row">
9999
<div class="col-md-4 mb-3">
100100
<h5><i class="bi bi-robot"></i> AI-Powered Tweets</h5>
101-
<p class="text-muted">Generate tweets using OpenAI's GPT-4 with custom prompts.</p>
101+
<p class="text-muted">Generate tweets using OpenAI's GPT-5-nano with custom prompts.</p>
102102
</div>
103103
<div class="col-md-4 mb-3">
104104
<h5><i class="bi bi-file-text"></i> Tweet Library</h5>

templates/post.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h1 class="mb-4">
1919
<i class="bi bi-robot"></i> AI-Generated Tweet
2020
</div>
2121
<div class="card-body">
22-
<p>Generate a tweet using OpenAI's GPT-4 with a custom prompt.</p>
22+
<p>Generate a tweet using OpenAI's GPT-5-nano with a custom prompt.</p>
2323

2424
<div class="mb-3">
2525
<label for="aiPrompt" class="form-label">Prompt for AI</label>

0 commit comments

Comments
 (0)