Giter Club home page Giter Club logo

Comments (10)

Sahas avatar Sahas commented on May 9, 2024

Can we have a separate documentation for serverless functions too?

from ai.

peterokwara avatar peterokwara commented on May 9, 2024

@Sahas can you

  • Check how long your function takes to run
  • Check the free tier how long serveless funcitons run (normally 10s)
  • Check paid tier how long serveless functions run (normally 60s)

from ai.

Sahas avatar Sahas commented on May 9, 2024

@peterokwara I've tried using calling same function with and without edge.

  1. With edge, the stream started in 2s & stream ended in 20s.
  2. With serverless, I'm not getting any response as the function invocation is getting timedout

from ai.

gadicc avatar gadicc commented on May 9, 2024

I'm guessing this is because of #97 ("Stream never closes with LangChainStream using postman"). Can you try one of the workarounds in that issue and see if that solves this problem? (You could also check in your dev console if the request is stuck open, even after new messages stop arriving).

from ai.

Sahas avatar Sahas commented on May 9, 2024

Will check, but any idea why it impacts only serverless functions and not edge function?

from ai.

Sahas avatar Sahas commented on May 9, 2024

@jaredpalmer / @shuding can you look into this issue please

from ai.

gadicc avatar gadicc commented on May 9, 2024

any idea why it impacts only serverless functions and not edge function?

No, but I'm less familiar with the edge stuff. I thought perhaps because of the different limits and runtimes, the above issue could possibly express itself this way.

from ai.

MaxLeiter avatar MaxLeiter commented on May 9, 2024

I think there are two issues here:

  1. Streaming langchain is broken for certain models (see #205)
  2. You are encountering a timeout. On the hobby tier of Vercel, serverless functions timeout after only 10 seconds.

closing as a duplicate, please reply back if you think I missed something.

from ai.

Sahas avatar Sahas commented on May 9, 2024

@MaxLeiter

  1. Why is it breaking only for serverless functions and not edge functions?
  2. I'm using vercel pro account, so the timeout is 60s.

from ai.

peterokwara avatar peterokwara commented on May 9, 2024

I've used this code

https://github.com/e-roy/openai-functions-with-langchain/blob/main/src/app/api/news-langchain/route.ts

But then i removed

export const runtime = "edge"; i think this means I am not using edge

And I don't get the same issues.
I am using vercel pro. I am using gpt-3.5-turbo-0613

from ai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.