Search

3,363 results found for openai (1797ms)

Code
3,268

Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to cre
### OpenAI
```ts
import { OpenAI } from "https://esm.town/v/std/openai";
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
{ role: "user", content: "Say hello in a creative way" },
Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to cre
### OpenAI
```ts
import { OpenAI } from "https://esm.town/v/std/openai";
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
{ role: "user", content: "Say hello in a creative way" },
import { generateText } from "npm:ai";
import { Effect } from "npm:effect";
import { OpenAiModel } from "./model.ts";
export const LlmAccessLive = Effect.succeed({
Effect.tryPromise(async () => {
const response = await generateText({
model: OpenAiModel,
prompt,
});
import { openai } from "npm:@ai-sdk/openai";
export const OpenAiModel = openai("gpt-4o");
import { drizzle } from "npm:drizzle-orm/libsql";
import { emails } from "./shared/db/schema.ts";
import { OpenAI } from "https://esm.town/v/std/openai?v=5";
import { email } from "https://esm.town/v/std/email?v=13";
const openai = new OpenAI();
export default async function (e: Email) {
});
const response = await openai.chat.completions.create({
model: "gpt-4o-mini",
messages: [
real/Sync/main.tsx
3 matches
import { Hono } from "npm:hono@4.4.12";
// @ts-ignore
import { OpenAI } from "https://esm.town/v/std/openai";
const app = new Hono();
app.post("/generate", async (c) => {
try {
const openai = new OpenAI();
const response = await openai.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "system", content: POET_PROMPT }],
import { Hono } from "npm:hono@4.4.12";
// @ts-ignore
import { OpenAI } from "https://esm.town/v/std/openai";
const app = new Hono();
app.post("/generate", async (c) => {
try {
const openai = new OpenAI();
const response = await openai.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "system", content: POET_PROMPT }],
// @ts-ignore
import { OpenAI } from "https://esm.town/v/std/openai?v=4";
import { Hono } from "npm:hono@4.4.12";
try {
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
model: "gpt-4o", // Using gpt-4o for better spatial reasoning and precise output
messages: [
const voice = document.getElementById('voiceSelect').value;
const curlCommand = \`curl -X POST "https://api.groq.com/openai/v1/audio/speech" \\\\
-H "Content-Type: application/json" \\\\
-H "Authorization: Bearer YOUR_GROQ_API_KEY" \\\\
const start = Date.now();
const response = await fetch("https://api.groq.com/openai/v1/audio/speech", {
method: "POST",
headers: {
Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to cre
### OpenAI
```ts
import { OpenAI } from "https://esm.town/v/std/openai";
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
{ role: "user", content: "Say hello in a creative way" },