From f49a30372dfb14b69571eb23c3ab37da993da674 Mon Sep 17 00:00:00 2001 From: zaidmukaddam Date: Thu, 28 Nov 2024 20:31:05 +0530 Subject: [PATCH] feat: update model in suggestQuestions and improve dialog accessibility and TabsList styling in MultiSearch component --- app/actions.ts | 4 ++-- components/multi-search.tsx | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/actions.ts b/app/actions.ts index 2822d33..a64d0be 100644 --- a/app/actions.ts +++ b/app/actions.ts @@ -11,7 +11,7 @@ export async function suggestQuestions(history: any[]) { console.log(history); const { object } = await generateObject({ - model: google('gemini-1.5-pro-002',{ + model: google('gemini-1.5-flash-8b',{ structuredOutputs: true, }), temperature: 1, @@ -27,7 +27,7 @@ For weather based converations sent to you, always generate questions that are a For programming based conversations, always generate questions that are about the algorithms, data structures, or other topics that are related to it or an improvement of the question. For location based conversations, always generate questions that are about the culture, history, or other topics that are related to the location. For the translation based conversations, always generate questions that may continue the conversation or ask for more information or translations. -Never use pronouns in the questions as they blur the context.`, +Do not use pronouns like he, she, him, his, her, etc. in the questions as they blur the context. Always use the proper nouns from the context.`, messages: history, schema: z.object({ questions: z.array(z.string()).describe('The generated questions based on the message history.') diff --git a/components/multi-search.tsx b/components/multi-search.tsx index 4afa57c..ffcf5ec 100644 --- a/components/multi-search.tsx +++ b/components/multi-search.tsx @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; -import { Dialog, DialogContent } from "@/components/ui/dialog"; +import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { ArrowUpRight, Calendar, ChevronLeft, ChevronRight, Clock, Globe, ImageIcon, Newspaper, Search, X } from 'lucide-react'; @@ -302,12 +302,12 @@ const MultiSearch: React.FC<{ result: MultiSearchResponse | null; args: MultiSea
- + {result.searches.map((search, index) => (
- + {result.searches.map((search, index) => ( - + Image Gallery +
@@ -360,8 +361,8 @@ const MultiSearch: React.FC<{ result: MultiSearchResponse | null; args: MultiSea className="max-h-[70vh] object-contain rounded-md mx-auto p-4" /> {result.searches[selectedSearch].images[selectedImage].description && ( -
-

+

+

{result.searches[selectedSearch].images[selectedImage].description}