167- [**We at Val Town**](https://www.val.town/u/valdottown) made [door](https://www.val.town/x/valdottown/door) for Val Town office guests to open the door through their phone, like [this](https://www.val.town/x/valdottown/door/pull/ef854848-34b0-11f0-9887-9e149126039e)!
168- [**Joey Hiller**](https://www.val.town/u/jhiller) made [ValTown-Package-Tracker](https://www.val.town/x/jhiller/ValTown-Package-Tracker) to track a package of sensors he was sending from Oakland to us in Downtown Brooklyn!
169- [**dinavinter**](https://www.val.town/u/dinavinter) made [slack](https://www.val.town/x/dinavinter/slack), a Slack bot that uses OpenAI to generate responses.
170- [**prashamtrivedi**](https://www.val.town/u/prashamtrivedi) made [hn-remote-ts-genai-jobs](https://www.val.town/x/prashamtrivedi/hn-remote-ts-genai-jobs), to track Hacker News' Who's Hiring filter for remote TypeScript + GenAI-related jobs.
171- [**dcm31**](https://www.val.town/u/dcm31) made [rotrank](https://www.val.town/x/dcm31/rotrank), an ELO ranking system for popular Italian Brainrot characters.
198 },
199 {
200 "title": "An Introduction to OpenAI fine-tuning",
201 "slug": "an-introduction-to-openai-fine-tuning",
202 "link": "/blog/an-introduction-to-openai-fine-tuning",
203 "description": "How to customize OpenAI to your liking",
204 "pubDate": "Fri, 25 Aug 2023 00:00:00 GMT",
205 "author": "Steve Krouse",
417 "slug": "val-town-newsletter-16",
418 "link": "/blog/val-town-newsletter-16",
419 "description": "Our seed round, growing team, Codeium completions, @std/openai, and more",
420 "pubDate": "Mon, 22 Apr 2024 00:00:00 GMT",
421 "author": "Steve Krouse",
167- [**We at Val Town**](https://www.val.town/u/valdottown) made [door](https://www.val.town/x/valdottown/door) for Val Town office guests to open the door through their phone, like [this](https://www.val.town/x/valdottown/door/pull/ef854848-34b0-11f0-9887-9e149126039e)!
168- [**Joey Hiller**](https://www.val.town/u/jhiller) made [ValTown-Package-Tracker](https://www.val.town/x/jhiller/ValTown-Package-Tracker) to track a package of sensors he was sending from Oakland to us in Downtown Brooklyn!
169- [**dinavinter**](https://www.val.town/u/dinavinter) made [slack](https://www.val.town/x/dinavinter/slack), a Slack bot that uses OpenAI to generate responses.
170- [**prashamtrivedi**](https://www.val.town/u/prashamtrivedi) made [hn-remote-ts-genai-jobs](https://www.val.town/x/prashamtrivedi/hn-remote-ts-genai-jobs), to track Hacker News' Who's Hiring filter for remote TypeScript + GenAI-related jobs.
171- [**dcm31**](https://www.val.town/u/dcm31) made [rotrank](https://www.val.town/x/dcm31/rotrank), an ELO ranking system for popular Italian Brainrot characters.
198 },
199 {
200 "title": "An Introduction to OpenAI fine-tuning",
201 "slug": "an-introduction-to-openai-fine-tuning",
202 "link": "/blog/an-introduction-to-openai-fine-tuning",
203 "description": "How to customize OpenAI to your liking",
204 "pubDate": "Fri, 25 Aug 2023 00:00:00 GMT",
205 "author": "Steve Krouse",
417 "slug": "val-town-newsletter-16",
418 "link": "/blog/val-town-newsletter-16",
419 "description": "Our seed round, growing team, Codeium completions, @std/openai, and more",
420 "pubDate": "Mon, 22 Apr 2024 00:00:00 GMT",
421 "author": "Steve Krouse",
167- [**We at Val Town**](https://www.val.town/u/valdottown) made [door](https://www.val.town/x/valdottown/door) for Val Town office guests to open the door through their phone, like [this](https://www.val.town/x/valdottown/door/pull/ef854848-34b0-11f0-9887-9e149126039e)!
168- [**Joey Hiller**](https://www.val.town/u/jhiller) made [ValTown-Package-Tracker](https://www.val.town/x/jhiller/ValTown-Package-Tracker) to track a package of sensors he was sending from Oakland to us in Downtown Brooklyn!
169- [**dinavinter**](https://www.val.town/u/dinavinter) made [slack](https://www.val.town/x/dinavinter/slack), a Slack bot that uses OpenAI to generate responses.
170- [**prashamtrivedi**](https://www.val.town/u/prashamtrivedi) made [hn-remote-ts-genai-jobs](https://www.val.town/x/prashamtrivedi/hn-remote-ts-genai-jobs), to track Hacker News' Who's Hiring filter for remote TypeScript + GenAI-related jobs.
171- [**dcm31**](https://www.val.town/u/dcm31) made [rotrank](https://www.val.town/x/dcm31/rotrank), an ELO ranking system for popular Italian Brainrot characters.
39
40 <p>
41 <a href="https://llm.datasette.io/en/stable/" class="text-blue-600 underline" target="_blank">llm</a> is a powerful command-line tool for interacting with OpenAI, Anthropic, Gemini, Llama, and many other LLMs.<br />
42 <span class="font-semibold">The recommended way to install <code>llm</code> is with Homebrew:</span>
43 </p>
56 <li>
57 <strong>Set your API key</strong><br />
58 <pre><code>llm keys set openai</code></pre>
59 <p class="mt-2">Paste your OpenAI API key when prompted. (You can also use Anthropic, Gemini, or local models via plugins.)</p>
60 </li>
61 <li>
9<img src="https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/df173046-1b81-407c-e86b-ddfc22d7ed00/public" width="600px" />
10
11This val has some useful code for packaging up pdfs to be sent to OpenAI and to be sent via @std/email.
12
13## Gmail forwarding Set-up
1import { email } from "https://esm.town/v/std/email";
2import { generateObject } from "npm:ai@5.0.3";
3import { openai } from "npm:@ai-sdk/openai@2.0.3";
4import { z } from "npm:zod@4.0.14";
5import { encodeBase64 } from "https://deno.land/std@0.224.0/encoding/base64.ts";
42
43 const { object: outgoingEmail } = await generateObject({
44 model: openai.responses("gpt-4o"),
45 schema: EmailSchema,
46 schemaName: "email",
1// @ts-ignore
2import { OpenAI } from "https://esm.town/v/std/openai?v=4";
3// @ts-ignore
4import { Hono } from "npm:hono@4.4.12";
265 `;
266
267 const openai = new OpenAI();
268 const completion = await openai.chat.completions.create({
269 model: "gpt-4o",
270 messages: [
1// @ts-ignore
2import { OpenAI } from "https://esm.town/v/std/openai?v=4";
3// @ts-ignore
4import { Hono } from "npm:hono@4.4.12";
172 `;
173
174 const openai = new OpenAI();
175 const completion = await openai.chat.completions.create({
176 model: "gpt-4o",
177 messages: [