Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

streamText works on local machine, but when I deployed my site on vercel, then it is not working #4216

Open
WiTheR60334 opened this issue Dec 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@WiTheR60334
Copy link

Description

Description:

I am making a travel chatbot using gemini, and it is working perfectly on local machine without any error. But when I had deployed it on vercel then it is not working.

Chatbot SS on local machine :

image

Chatbot SS when deployed :

image

Vercel Logs SS :

image

As you can see in Vercel Logs, the "hi" query is received without any error, but the response from chatbot is not working. I have tried to console log the response, but it is empty.

I have also added below code in ./layout.jsx and page.jsx , but still there is no response from chatbot.

import { unstable_noStore as noStore } from 'next/cache';
export const dynamic = 'force-dynamic';
export const maxDuration = 60;

noStore();

I have referred to #1519 and https://sdk.vercel.ai/docs/troubleshooting/streaming-not-working-on-vercel , but still same problem is there, it is not resolving.

Github Repo : https://github.com/WiTheR60334/TrippoBot2

Code example

import { unstable_noStore as noStore } from 'next/cache';
export const dynamic = 'force-dynamic';
export const maxDuration = 60;

import localFont from "next/font/local";
import "./globals.css";
import Navbar from "@/components/Navbar/Navbar";
import Footer from "@/components/footer/footer";
import {Providers} from "./Providers";

const geistSans = localFont({
src: "./fonts/GeistVF.woff",
variable: "--font-geist-sans",
weight: "100 900",
});
const outfit = localFont({
src: "./fonts/Outfit-VariableFont_wght.ttf",
variable: "--outfit",
weight: "100 900",
});

export const metadata = {
title: "Trippo.ai",
description: "Perfect ChatBot for Travel Planning",
};

export default function RootLayout({ children }) {
noStore();
return (
<html lang="en" style={{ height: "100%", margin: "0" }}>

<script src="https://cdn.jsdelivr.net/npm/typed.js@2.0.12"></script>

  </head>
  {/* <head>
    <style>
      @import
      url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap');
    </style>
  </head> */}
  <body className={`${geistSans.variable} ${outfit.variable} antialiased`}>
    <Providers>
    <Navbar />
    {children}
    <div style={{marginTop: "8rem", borderTop: "1px solid #000"}}>
      <Footer />
    </div>
    </Providers>
  </body>
</html>

);
}

AI provider

@ai-sdk/google: ^1.0.10

Additional context

No response

@WiTheR60334 WiTheR60334 added the bug Something isn't working label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant