langflow-ai / langflow

Langflow is a low-code app builder for RAG and multi-agent AI applications. It’s Python-based and agnostic to any model, API, or database.
http://www.langflow.org
MIT License
32.07k stars 3.95k forks source link

Error building Component HuggingFace: max_new_tokens not found in HuggingFaceEndpointsComponent #4182

Open v-wei40680 opened 4 days ago

v-wei40680 commented 4 days ago

Bug Description

Error building Component HuggingFace: max_new_tokens not found in HuggingFaceEndpointsComponent flow Component: chat input -> HuggingFace -> chat output

Reproduction

my step:

  1. clone hugging face space:https://huggingface.co/spaces/Langflow/Langflow?duplicate=true
  2. flow
    • chat input
    • HuggingFace
    • input API Token(flow input)
    • chat output
    • playground(flow run)

Expected behavior

chat at playground

Who can help?

No response

Operating System

hugging face Space cpu basic

Langflow Version

langflowai/langflow:latest

Python Version

None

Screenshot

No response

Flow File

No response

dosubot[bot] commented 4 days ago

Hey there, @v-wei40680! I'm here to help you with bugs, questions, and contributions. Let's tackle this issue together while we wait for a human maintainer.

The error you're encountering, "max_new_tokens not found in HuggingFaceEndpointsComponent," suggests that the max_new_tokens parameter is missing or not properly defined in your flow setup. In the Langflow codebase, the max_new_tokens parameter is expected to be used within the create_huggingface_endpoint method of the HuggingFaceEndpointsComponent [1].

To resolve this issue, ensure that the max_new_tokens parameter is correctly specified in your flow configuration. You might need to check the component settings in your flow to ensure that this parameter is included and has a valid value. If the parameter is not visible in the UI, it might be necessary to update the component or the flow configuration to include it.

To continue talking to Dosu, mention @dosu.