'use client'; import ImageSelector from '@/components/chat/ImageSelector'; import { generateInputImageMarkdown } from '@/lib/messageUtils'; import { fetcher } from '@/lib/utils'; import { useRouter } from 'next/navigation'; import { Tooltip, TooltipContent, TooltipTrigger, } from '@/components/ui/Tooltip'; import { IconDiscord, IconGitHub } from '@/components/ui/Icons'; import Link from 'next/link'; import { Button } from '@/components/ui/Button'; import Img from '@/components/ui/Img'; import { MessageRaw } from '@/lib/db/types'; import { dbPostCreateChat } from '@/lib/db/functions'; import { useState } from 'react'; import Loading from '@/components/ui/Loading'; // const EXAMPLE_URL = 'https://landing-lens-support.s3.us-east-2.amazonaws.com/vision-agent-examples/cereal-example.jpg'; const EXAMPLE_URL = 'https://vision-agent-dev.s3.us-east-2.amazonaws.com/examples/flower.png'; const EXAMPLE_HEADER = 'Counting and find'; const EXAMPLE_SUBHEADER = 'number of flowers, area of largest and smallest flower'; const EXAMPLE_PROMPT = 'Count the number of flowers and find the area of the largest and smallest flower'; const exampleMessages = [ { heading: EXAMPLE_HEADER, subheading: EXAMPLE_SUBHEADER, url: EXAMPLE_URL, initMessages: [ { role: 'user' as MessageRaw['role'], content: EXAMPLE_PROMPT + '\n\n' + generateInputImageMarkdown(EXAMPLE_URL), }, ], }, // { // heading: 'Detecting', // url: 'https://landing-lens-support.s3.us-east-2.amazonaws.com/vision-agent-examples/cereal-example.jpg', // subheading: 'number of cereals in an image', // message: `How many cereals are there in the image?`, // }, ]; export default function Page() { const router = useRouter(); const [isUploading, setUploading] = useState(false); return (

Welcome to Vision Agent

Vision Agent is a library that helps you utilize agent frameworks for your vision tasks. Vision Agent aims to provide an in-seconds experience by allowing users to describe their problem in text and utilizing agent frameworks to solve the task for them.

Github Discord
{exampleMessages.map((example, index) => (
1 && 'hidden md:block' }`} onClick={async () => { setUploading(index); const resp = await dbPostCreateChat({ mediaUrl: example.url, initMessages: example.initMessages, }); setUploading(false); if (resp) { router.push(`/chat/${resp.id}`); } }} > {isUploading === index && (
)} example images
{example.heading}
{example.subheading}
))}
); }