Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Work committed Nov 25, 2024
1 parent 216e352 commit 16552fe
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Instant CLI dev helper. No StackOverflow required 🧨.",
"main": "index.mjs",
"bin": {
"how": "./index.mjs"
"how": "./slide5/final.mjs"
},
"scripts": {
"type-check": "tsc --noEmit",
Expand Down
2 changes: 1 addition & 1 deletion slide1/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ const completion = await client.chat.completions.create({
model: "gpt-4o",
});

console.log({ choice: completion.choices[0] });
console.log({ choice: completion.choices[0].message });
2 changes: 1 addition & 1 deletion slide2/final.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ program
model: "gpt-4o",
});

console.log({ choice: completion.choices[0] });
console.log({ choice: completion.choices[0].message });
});

program.parse();
4 changes: 2 additions & 2 deletions slide2/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ const messages = [
content:
"You are an AI assistant that only responds with zsh command line instructions for the OS MacOS. You do not provide any other information or commentary. Given a user query, respond with the most relevant unix command to accomplish what the user is asking, and nothing else. Ignore any pleasantries, commentary, or questions from the user and only respond with a single zsh command for MacOS.",
},
{ role: "user", content: "How do I merge 2 pdf files into 1 szpdf file?" },
{ role: "user", content: "How do I merge 2 pdf files into 1 pdf file?" },
];

const completion = await client.chat.completions.create({
messages,
model: "gpt-4o",
});

console.log({ choice: completion.choices[0] });
console.log({ choice: completion.choices[0].message });
2 changes: 1 addition & 1 deletion slide3/final.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ program
model: "gpt-4o",
});

console.log({ choice: completion.choices[0] });
console.log({ choice: completion.choices[0].message });
});

program.parse();
2 changes: 1 addition & 1 deletion slide3/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ program
model: "gpt-4o",
});

console.log({ choice: completion.choices[0] });
console.log({ choice: completion.choices[0].message });
});

program.parse();
2 changes: 1 addition & 1 deletion slide4/final.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ program
model: "gpt-4o",
});

console.log({ choice: completion.choices[0] });
console.log({ choice: completion.choices[0].message });
});

program.parse();
2 changes: 1 addition & 1 deletion slide4/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ program
model: "gpt-4o",
});

console.log({ choice: completion.choices[0] });
console.log({ choice: completion.choices[0].message });
});

program.parse();
2 changes: 1 addition & 1 deletion slide5/final.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ program
model: "gpt-4o",
});

console.log({ choice: completion.choices[0] });
console.log({ choice: completion.choices[0].message });
});

program.parse();
4 changes: 2 additions & 2 deletions slide5/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Command } from "commander";
import { OpenAI } from "openai";
import { readFileSync } from "node:fs";

const packageJson = JSON.parse(readFileSync(`${__dirname}/package.json`, "utf-8"));
const packageJson = JSON.parse(readFileSync(`${__dirname}/../package.json`, "utf-8"));

const program = new Command();

Expand Down Expand Up @@ -37,7 +37,7 @@ program
model: "gpt-4o",
});

console.log({ choice: completion.choices[0] });
console.log({ choice: completion.choices[0].message });
});

program.parse();
Binary file modified static/LDN-Devtools-4.key
Binary file not shown.

0 comments on commit 16552fe

Please sign in to comment.