FlowiseAI / Flowise

Drag & drop UI to build your customized LLM flow
https://flowiseai.com
Apache License 2.0
30.39k stars 15.71k forks source link

[BUG] Failed to calculate number of tokens, falling back to approximate count Error: Unknown model #955

Closed kientv closed 2 weeks ago

kientv commented 1 year ago

I tried to use ChatGooglePalm with models/chat-bison-001 (default) but error like below:

flowise_1  |     at getEncodingNameForModel (/usr/src/packages/node_modules/js-tiktoken/dist/lite.cjs:217:13)
flowise_1  |     at encodingForModel (/usr/src/packages/node_modules/langchain/dist/util/tiktoken.cjs:24:59)
flowise_1  |     at ChatGooglePaLM.getNumTokens (/usr/src/packages/node_modules/langchain/dist/base_language/index.cjs:96:75)
flowise_1  |     at MapReduceDocumentsChain._call (/usr/src/packages/node_modules/langchain/dist/chains/combine_docs_chain.cjs:180:77)
flowise_1  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
flowise_1  |     at async MapReduceDocumentsChain.call (/usr/src/packages/node_modules/langchain/dist/chains/base.cjs:104:28)
flowise_1  |     at async ConversationalRetrievalQAChain._call (/usr/src/packages/node_modules/langchain/dist/chains/conversational_retrieval_chain.cjs:146:24)
flowise_1  |     at async ConversationalRetrievalQAChain.call (/usr/src/packages/node_modules/langchain/dist/chains/base.cjs:104:28)
flowise_1  |     at async ConversationalRetrievalQAChain_Chains.run (/usr/src/packages/packages/components/dist/nodes/chains/ConversationalRetrievalQAChain/ConversationalRetrievalQAChain.js:175:25)
flowise_1  |     at async App.processPrediction (/usr/src/packages/packages/server/dist/index.js:840:19)
==flowise_1  | 2023-09-20 13:10:17 [ERROR]: [server]: Error: Cannot read properties of undefined (reading 'text')
flowise_1  | TypeError: Cannot read properties of undefined (reading 'text')
flowise_1  |     at NoOpOutputParser.parseResult (/usr/src/packages/node_modules/langchain/dist/schema/output_parser.cjs:47:42)
flowise_1  |     at NoOpOutputParser.parseResultWithPrompt (/usr/src/packages/node_modules/langchain/dist/schema/output_parser.cjs:20:21)
flowise_1  |     at LLMChain._getFinalOutput (/usr/src/packages/node_modules/langchain/dist/chains/llm_chain.cjs:96:55)
flowise_1  |     at LLMChain._call (/usr/src/packages/node_modules/langchain/dist/chains/llm_chain.cjs:126:42)
flowise_1  |     at async LLMChain.call (/usr/src/packages/node_modules/langchain/dist/chains/base.cjs:104:28)
flowise_1  |     at async StuffDocumentsChain._call (/usr/src/packages/node_modules/langchain/dist/chains/combine_docs_chain.cjs:62:24)
flowise_1  |     at async StuffDocumentsChain.call (/usr/src/packages/node_modules/langchain/dist/chains/base.cjs:104:28)
flowise_1  |     at async MapReduceDocumentsChain._call (/usr/src/packages/node_modules/langchain/dist/chains/combine_docs_chain.cjs:210:24)
flowise_1  |     at async MapReduceDocumentsChain.call (/usr/src/packages/node_modules/langchain/dist/chains/base.cjs:104:28)
flowise_1  |     at async ConversationalRetrievalQAChain._call (/usr/src/packages/node_modules/langchain/dist/chains/conversational_retrieval_chain.cjs:146:24)
HenryHengZJ commented 1 year ago

hmm perhaps there's some setup problem got PaLM. Here's a tutorial on using PaLM on Flowise - https://youtu.be/CfpZ_xZG3bM?si=jeoPF6KtT42mvjtK

kientv commented 1 year ago

hmm perhaps there's some setup problem got PaLM. Here's a tutorial on using PaLM on Flowise - https://youtu.be/CfpZ_xZG3bM?si=jeoPF6KtT42mvjtK

Your clip is not using Conversational Retrieval QA Chain and not using ChatGooglePaLM

kientv commented 1 year ago

GooglePaLM is working fine with models/text-bison-001, but ChatGooglePaLM is not working with models/chat-bison-001.