Skip to content

Instantly share code, notes, and snippets.

View NiceJimmy's full-sized avatar

Jimmy NiceJimmy

View GitHub Profile
@NiceJimmy
NiceJimmy / gist:4ea7b366bada502dcab1721e2a416a55
Created September 26, 2025 19:08
[7편] AI 여행앱 만들기 : Gemini에 여행지 추천 API 요청을 할때 사용하는 JSON Body
{
"contents": [
{
"parts": [
{
"text": "You are a strict and precise travel recommendation API. Your ONLY job is to return a raw JSON list. Adhere to all rules strictly. Do NOT include any introductory text, explanations, or markdown like ```json.\n\n## User Input\n- City: <city>\n- Duration: <days> days\n- Budget: <budget>\n- Interests: <interests>\n\n## CRITICAL RULES\n1. The final output must be a JSON list of at least 7 objects.\n2. Each object in the array MUST have these exact keys: \"name\", \"reason\", \"lat\", \"lng\", \"tags\", \"category\", \"city\", and \"interests\".\n3. The \"city\" value MUST be the city from the User Input and must be included in every object.\n4. The `interests` value for each object MUST be a JSON array. This array must ONLY contain the specific keyword(s) from the User Input `Interests` that the recommended place directly matches. In most cases, this will be a single-element array containing the same value as the `
@NiceJimmy
NiceJimmy / .dart
Created September 26, 2025 19:02
[7편] AI 여행앱 만들기 FlutterFlow 커스텀 함수: Gemini API 여행 추천 결과(JSON)를 Data Type으로 변환하는 코드
import 'dart:convert';
import 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:intl/intl.dart';
import 'package:timeago/timeago.dart' as timeago;
import '/flutter_flow/custom_functions.dart';
import '/flutter_flow/lat_lng.dart';
import '/flutter_flow/place.dart';