hdindex.html5 matches
70<li>Data-driven insights for better decision making</li>
71<li>Optimization of honey production through precise monitoring</li>
72<li>Reduced travel costs for beekeepers with multiple apiaries</li>
73<li>Historical data collection for long-term colony management</li>
74</ul>
128</p>
129<ul class="list-disc pl-6 mt-2">
130<li><strong>WiFi:</strong> For apiaries with reliable WiFi access</li>
131<li><strong>Cellular (3G/4G/5G):</strong> For remote locations without WiFi</li>
132<li><strong>LoRaWAN:</strong> Low-power, long-range wireless technology ideal for rural areas</li>
135</ul>
136<p class="mt-2">
137The choice depends on the location of your apiary, power availability, and the specific smart hive system you're using.
138</p>
139</div>
263<li><strong>Mid-range systems:</strong> $300-600 for multiple sensors and wireless connectivity</li>
264<li><strong>Advanced systems:</strong> $600-1,500 for comprehensive monitoring with multiple sensor types</li>
265<li><strong>Commercial systems:</strong> $1,500+ for professional-grade equipment for large apiaries</li>
266</ul>
267<p class="mt-2">
284<ul class="list-disc pl-6 mt-2">
285<li><strong>Commercial beekeepers:</strong> Often see significant ROI through reduced colony losses, optimized honey production, and decreased labor costs</li>
286<li><strong>Hobbyists with remote apiaries:</strong> Can save on travel costs and time</li>
287<li><strong>New beekeepers:</strong> May benefit from the learning opportunities and reduced risk of colony loss</li>
288<li><strong>Research and education:</strong> Valuable for data collection and analysis</li>
test-multiembedt.tsx2 matches
8};
9export default async function(req: Request): Promise<Response> {
10const API_URL: string = "https://api.val.town";
11async function proxiedFetch(input: string | URL, requestInit?: RequestInit) {
12let query = new URLSearchParams({
13url: input.toString(),
14});
15return fetch(`${API_URL}/v1/fetch?${query}`, {
16...requestInit,
17// @ts-ignore
untitled-5703index.ts11 matches
52});
5354// API Routes
55const api = new Hono();
5657// Jobs API
58api.get("/jobs", async c => {
59const jobs = await getAllJobs();
60return c.json(jobs);
61});
6263api.get("/jobs/:id", async c => {
64const id = parseInt(c.req.param("id"));
65if (isNaN(id)) {
75});
7677api.post("/jobs", async c => {
78try {
79const body = await c.req.json() as JobInput;
91});
9293// Chat API
94api.get("/messages", async c => {
95const limit = c.req.query("limit") ? parseInt(c.req.query("limit")) : 50;
96const messages = await getMessages(limit);
98});
99100api.post("/messages", async c => {
101try {
102const body = await c.req.json() as MessageInput;
114});
115116// Mount API routes
117app.route("/api", api);
118119// Export the app
untitled-5703index.js4 matches
134async function fetchJobs() {
135try {
136const response = await fetch('/api/jobs');
137if (!response.ok) throw new Error('Failed to fetch jobs');
138
188elements.submitJobButton.textContent = 'Posting...';
189
190const response = await fetch('/api/jobs', {
191method: 'POST',
192headers: {
236async function fetchMessages() {
237try {
238const response = await fetch('/api/messages');
239if (!response.ok) throw new Error('Failed to fetch messages');
240
292};
293
294const response = await fetch('/api/messages', {
295method: 'POST',
296headers: {
Mercurymercury.ts16 matches
23/**
4* Mercury Bank API Client
5*
6* Documentation: https://docs.mercury.com/reference/api-reference
7*/
8export class MercuryClient {
9private apiKey: string;
10private baseUrl: string = 'https://api.mercury.com/api/v1';
11
12constructor() {
13const apiKey = Deno.env.get('MERCURY_API_KEY');
14if (!apiKey) {
15throw new Error('MERCURY_API_KEY environment variable is required');
16}
17this.apiKey = apiKey;
18}
19
20/**
21* Make an authenticated request to the Mercury API
22*/
23private async request<T>(
28const url = `${this.baseUrl}${endpoint}`;
29const headers = {
30'Authorization': `Bearer ${this.apiKey}`,
31'Content-Type': 'application/json',
32};
50if (!response.ok) {
51const errorText = await response.text();
52console.error(`Mercury API error (${response.status}):`, errorText);
53throw new Error(`Mercury API error (${response.status}): ${errorText}`);
54}
55
58return data as T;
59} catch (error) {
60console.error('Error in Mercury API request:', {
61message: error.message,
62stack: error.stack,
72async getAccounts(): Promise<MercuryAccount[]> {
73try {
74console.log('Fetching accounts from Mercury API');
75// Try the documented endpoint structure first
76const response = await this.request<{ accounts: MercuryAccount[] }>('/accounts');
129console.log(`Fetching transactions for account ${accountId}, limit: ${limit}`);
130
131// Try different endpoint formats to handle potential API variations
132let endpoint = `/accounts/${accountId}/transactions?limit=${limit}`;
133if (cursor) {
163limit: number = 10
164): Promise<MercuryTransaction[]> {
165// Note: This is a simplified implementation. Mercury's actual search API
166// might have different parameters or structure.
167const endpoint = `/transactions/search?q=${encodeURIComponent(query)}&limit=${limit}`;
18// In a production environment, you should verify the request signature
19// using the Slack signing secret. For simplicity, we're skipping that here.
20// https://api.slack.com/authentication/verifying-requests-from-slack
21
22const slackSigningSecret = Deno.env.get('SLACK_SIGNING_SECRET');
82cause: txError.cause
83});
84return formatErrorMessage(`API Error: ${txError.message}`);
85}
86} catch (error) {
beeAifrontend.html4 matches
8<script src="https://esm.town/v/std/catch"></script>
9<style>
10@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');
11
12:root {
377
378try {
379// Send message to API
380const response = await fetch('/api/chat', {
381method: 'POST',
382headers: {
444try {
445// Send request to generate image
446const response = await fetch('/api/generate-image', {
447method: 'POST',
448headers: {
200}
201202// API routes
203app.get("/api/messages", async (c) => {
204try {
205const messages = await getRecentMessages();
13## How It Works
1415BeeGPT uses OpenAI's API to generate responses and images, but adds a bee-themed personality layer through prompt engineering. The system includes:
16171. A backend API that communicates with OpenAI
182. A bee-themed prompt that instructs the AI to respond with bee-related content
193. A bee-themed image generator that enhances prompts with bee elements
41- Tabbed interface for switching between chat and image generation
4243## API Endpoints
4445- `GET /` - Serves the frontend HTML
46- `POST /api/chat` - Accepts a JSON payload with a `message` field and returns an AI response
47- `POST /api/generate-image` - Accepts a JSON payload with `prompt` and optional `size` fields and returns an image URL
4849## Environment Variables
5051This project requires an OpenAI API key to be set in your Val Town environment variables.
5253## License
syllabus-todogemini.ts2 matches
1import { GoogleGenAI, Type } from "npm:@google/genai";
23// Access your API key as an environment variable
4const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
56const _prompt = `Parse the Units and their topics from the provided image of syllabus by performing an OCR on the image