founder @outapint.io
vibe coding on val.town.
dm me to build custom vals: https://artivilla.com
Purveyors of Hono tooling, API Playground enthusiasts, and creators of 🪿 HONC 🪿 (https://honc.dev)
Run AI with an API
You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/?q=api&page=1&format=json
For typeahead suggestions, use the /typeahead
endpoint:
https://codesearch.val.run/typeahead?q=api
Returns an array of strings in format "username" or "username/projectName"
Found 4126 results for "api"(453ms)
9192export async function sendDailyBriefing(chatId?: string, today?: DateTime) {
93// Get API keys from environment
94const apiKey = Deno.env.get("ANTHROPIC_API_KEY");
95const telegramToken = Deno.env.get("TELEGRAM_TOKEN");
96100}
101102if (!apiKey) {
103console.error("Anthropic API key is not configured.");
104return;
105}
116117// Initialize Anthropic client
118const anthropic = new Anthropic({ apiKey });
119120// Initialize Telegram bot
156157// disabled title for now, it seemes unnecessary...
158// await bot.api.sendMessage(chatId, `*${title}*`, { parse_mode: "Markdown" });
159160// Then send the main content
163164if (content.length <= MAX_LENGTH) {
165await bot.api.sendMessage(chatId, content, { parse_mode: "Markdown" });
166// Store the briefing in chat history
167await storeChatMessage(
192// Send each chunk as a separate message and store in chat history
193for (const chunk of chunks) {
194await bot.api.sendMessage(chatId, chunk, { parse_mode: "Markdown" });
195// Store each chunk in chat history
196await storeChatMessage(
86console.log(e.text);
8788// Get Anthropic API key from environment
89const apiKey = Deno.env.get("ANTHROPIC_API_KEY");
90if (!apiKey) {
91console.error("Anthropic API key is not configured for this val.");
92return;
93}
9495// Initialize Anthropic client
96const anthropic = new Anthropic({ apiKey });
9798// Process each image attachment serially