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

[BUG] chatflows adding multiple times (per every request) in to the ChatFlowPool using Embed website or API #3350

Open
IacsonNicolas opened this issue Oct 14, 2024 · 2 comments

Comments

@IacsonNicolas
Copy link

IacsonNicolas commented Oct 14, 2024

Describe the bug
Every time i make a request from JS, Postman or even embed in websites the request takes a considerable amount of time in retriving a answer (if it does) and takes around a x1000 of tokens in the open IA embedding model, triying to find the error i found that for every request is added a chatflow in to the ChatflowPool

To Reproduce
Steps to reproduce the behavior:

  1. Create a flow with embedding a model of Open IA
  2. Make curl or use postman to call the flowise api
  3. See chatflow added multiple times in console and billing in Open IA

Expected behavior
The api should not add the chatflow in the ChatflowPool every time a request is created from the api or the embed (i think the problem comes from there)
The amount of tokens used per request should be similar to the amount of tokens used in the chat integrated in flowise and the responses should be quicker

Screenshots
chatbot flowise console

Setup

  • Installation [npx flowise start]
  • Flowise Version [2.1.2]
  • OS: [Windows]
  • Browser [Firefox]
@IacsonNicolas
Copy link
Author

IacsonNicolas commented Oct 15, 2024

it also happens in docker and others versions of flowise

this is the flow i used, hope it helps
Chatflow.json

And this is a demostration with ollama
https://www.youtube.com/watch?v=PVvGOUJEeW0

@HenryHengZJ
Copy link
Contributor

ah yes, when you use In Memory Store, every time when the question is asked, it will do the embeddings everytime. recommend to use others.. we should have some description around mentioning that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants