Skip to content

Commit

Permalink
v1 shipping for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
git-create-devben committed Aug 3, 2024
1 parent cff0934 commit 6a93bb3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
5 changes: 3 additions & 2 deletions app/api/gemini/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ export async function POST(req: NextRequest) {
const model = genAI.getGenerativeModel({ model: "gemini-1.5-pro" });

// Modify the prompt to include the user's name
const prompt = `You are Loca, a local AI service finder. You're talking to ${userName}. This is a FAQ about you: ${faqs}. Use this to improve your response. ${
const prompt = `You are Loca, a local AI service finder. You're talking to ${userName}.Here is some important information about you (Loca) in the form of FAQs:
${JSON.stringify(faqs)} ${
services.length > 0
? `Here are some available services: ${JSON.stringify(services)}. Provide a helpful response based on this information, highlighting the best options for ${userName}.`
: `Provide a general response about "${userMessage}" for ${userName}. If they are asking about local services, suggest how they might find them.`
: `Provide a general response about "${userMessage}" for ${userName}. If they are asking about local services, suggest how they might find them using your ${faqs} aor just let them know to turn on their location, tell them to give you access to thier location cause you will need that to get them services near them.`
}`;

// Generate content stream from the AI model based on the prompt
Expand Down
2 changes: 1 addition & 1 deletion app/chat/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default function Chat() {
</div>
<div className=" bg-[#1212] min-h-[100vh] pb-[15vh] relative flex-1 ">
<div className="flex flex-col max-h-[830px] overflow-y-auto scroll-m-1">
<div className="sticky z-10 top-0 w-full shadow-lg">
<div className="sticky bg-fixed z-10 top-0 w-full shadow-2xl bg-black">
<nav className="flex justify-between p-4 ">
<span
className="text-[#caccce] font-medium text-3xl cursor-pointer"
Expand Down
18 changes: 10 additions & 8 deletions components/booking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export function Booking({
loading="eager"
onError={handleMapError}
title={`Map of ${locationName || "service location"}`}
// referrerpolicy="no-referrer-when-downgrade"
// referrerpolicy="no-referrer-when-downgrade"
></iframe>
) : (
<div className="bg-gray-100 p-4 text-center">
Expand Down Expand Up @@ -190,13 +190,15 @@ export function Booking({
<Link href="/chat/booking">Book by Loca</Link>
</Button> */}
<BookingForm />
<span className="text-xs underline text-center">
<BookingForm />
<Link
href="/faqs"
className="text-xs underline text-center cursor-pointer"
>
ReadMore on How we use Loca to Book you a service provider
</span>
{/* <span className="text-xs text-center">
Booking by loca is still in development and will be available
soon..
</span> */}
</Link>


</div>
<DialogFooter className="sm:justify-start">
<DialogClose asChild>
Expand Down Expand Up @@ -282,7 +284,7 @@ export function Booking({
loading="eager"
onError={handleMapError}
title={`Map of ${locationName || "service location"}`}
// referrerpolicy="no-referrer-when-downgrade"
// referrerpolicy="no-referrer-when-downgrade"
></iframe>
) : (
<div className="bg-gray-100 p-4 text-center">
Expand Down
2 changes: 1 addition & 1 deletion components/bookingForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function BookingForm() {
...formData,
createdAt: new Date(),
});
alert("Submitted successfully");
alert("Submitted successfully, hold on while we process your booking");
console.log("Document written with ID: ", docRef.id);
router.push("/chat");
setIsOpen(false);
Expand Down
2 changes: 1 addition & 1 deletion components/viewmore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const ViewMore: React.FC<ViewMoreProps> = ({ data }) => {
return (
<main>
<Sheet>
<SheetTrigger>View More</SheetTrigger>
<SheetTrigger className="underline text-blue-600">View More</SheetTrigger>
<SheetContent className="bg-[#1e1f20] text-white border-none overflow-auto">
<SheetHeader className="mt-5">
<SheetTitle className="text-white text-md">
Expand Down

0 comments on commit 6a93bb3

Please sign in to comment.