Skip to content

Commit

Permalink
chore: write column using o1 model
Browse files Browse the repository at this point in the history
  • Loading branch information
kudoh committed Jan 24, 2025
1 parent 3d01657 commit 05cd7df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/bin/generate-column-o1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Please pick one of these keywords and write a short article about it.`;

async function createColumn() {
const result = await openai.chat.completions.create({
model: 'o1-preview',
model: 'o1',
// model: 'gpt-4o-mini', // for testing
messages: [
{
Expand Down Expand Up @@ -146,6 +146,7 @@ Please pick one of these keywords and write a short article about it.`;
for (let retry = 0; retry <= 3; retry++) {
if (column.length <= 600 || !checkFormat(column)) {
console.warn('too short column or illegal format!! retrying...', retry);
await new Promise(resolve => setTimeout(resolve, 3000 * retry));
column = await createColumn();
} else {
console.info('check OK!')
Expand Down

0 comments on commit 05cd7df

Please sign in to comment.