Search
Code3,285
- **Backend**: Hono + TypeScript- **Frontend**: React + TypeScript + TailwindCSS- **AI**: OpenAI GPT for content generation- **Voice**: Web Speech API for voice input
import { Hono } from "https://esm.sh/hono@3.11.7";import { OpenAI } from "https://esm.town/v/std/openai";import type { MealPlanRequest, const plans = new Hono();const openai = new OpenAI();// Generate a new meal plan
- **Database**: SQLite for user preferences and meal data- **Styling**: TailwindCSS- **AI**: OpenAI for intelligent meal suggestions
import { Hono } from "https://esm.sh/hono@3.11.7";import { OpenAI } from "https://esm.town/v/std/openai";import { getUserSkills, const matching = new Hono();const openai = new OpenAI();// AI-powered skill matchingFormat: {"score": number, "reasoning": "string"}`; const completion = await openai.chat.completions.create({ messages: [{ role: "user", content: prompt }], model: "gpt-4o-mini",Return as JSON array: ["skill1", "skill2", "skill3", "skill4", "skill5"]`; const completion = await openai.chat.completions.create({ messages: [{ role: "user", content: prompt }], model: "gpt-4o-mini",
## Environment Variables- `OPENAI_API_KEY`: Required for AI matching functionality
// Mood check-in routes for Ayédùn appimport { Hono } from "https://esm.sh/hono@3.11.7";import { OpenAI } from "https://esm.town/v/std/openai";import { createMoodEntry, getUserMoodEntries, trackEngagement } from "../database/queries.ts";import { MOODS, AFFIRMATIONS } from "../../shared/data.ts";const mood = new Hono();const openai = new OpenAI();// Get all available moods Provide a gentle, culturally warm affirmation in ${language === 'fr' ? 'French' : 'English'} that acknowledges their feelings and offers hope. Keep it under 100 characters and make it personal and healing-focused.`; const completion = await openai.chat.completions.create({ messages: [{ role: "user", content: prompt }], model: "gpt-4o-mini",
import { Hono } from "https://esm.sh/hono@3.11.7";import { OpenAI } from "https://esm.town/v/std/openai";import { readFile, serveFile } from "https://esm.town/v/std/utils@85-main/index.ts";import type { StoryRequest, PoemRequest, GenerationResponse, LogsResponse, EngagementStats } from "../shared/types.ts";});const openai = new OpenAI();// Helper function to get or create session IDCreate an engaging story with a clear beginning, middle, and end. Focus on vivid imagery, compelling dialogue, and emotional resonance. The story should capture the specified mood and explore the theme meaningfully.`; const completion = await openai.chat.completions.create({ messages: [ { } else { // Generate a title const titleCompletion = await openai.chat.completions.create({ messages: [ { Create a poem that evokes the specified mood and meaningfully explores the theme. Use vivid imagery, metaphor, and emotional resonance. The poem should feel authentic and inspiring.`; const completion = await openai.chat.completions.create({ messages: [ { } else { // Generate a title const titleCompletion = await openai.chat.completions.create({ messages: [ {
- **Backend**: Hono API framework- **Database**: SQLite for user data and analytics- **AI**: OpenAI for affirmations and recommendations- **Styling**: African-inspired design with warm color palette
import { Hono } from "https://esm.sh/hono@3.11.7";import { OpenAI } from "https://esm.town/v/std/openai";import { readFile } from "https://esm.town/v/std/utils@85-main/index.ts";});const openai = new OpenAI();// Fallback name pairs for when OpenAI parsing failsfunction generateFallbackPairs(genderPreference: string, style: string) { const fallbacks = {Focus on creating beautiful, meaningful name combinations that parents would actually consider. Return only the JSON object.`; const completion = await openai.chat.completions.create({ messages: [ { role: "system", content: "You are a helpful assistant specializing in baby names. Provide creative, culturally diverse, and meaningful name suggestions." },
# Twin Name GeneratorAn AI-powered tool for generating perfect name pairs for twins using OpenAI's GPT model.## Features- **Frontend**: HTML, CSS (TailwindCSS), Vanilla JavaScript- **Backend**: Hono framework on Val Town- **AI**: OpenAI GPT-4o-mini for intelligent name generation- **Styling**: Gradient backgrounds, smooth animations, responsive design
reconsumeralization
import { OpenAI } from "https://esm.town/v/std/openai";
import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
/**
* Practical Implementation of Collective Content Intelligence
* Bridging advanced AI with collaborative content creation
*/
exp
kwhinnery_openai
lost1991
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",
No docs found