Replies: 2 comments
-
🤖 Hello @DreF174! Nice to meet you, I'm Dosu, a friendly bot designed to help out with bug solving, answering questions, and guiding contributors in the right direction. While we wait for a human maintainer, I'm here to assist you as best as I can. Let's work together to sort out your issue. The error you're encountering typically arises when you're trying to pass extra fields to a function or method that doesn't expect them. In your case, you're trying to pass the LLM, prompt, and tool for code execution to the To resolve this issue, you need to modify the from langflow import CustomComponent
from langflow.field_typing import Data
class Component(CustomComponent):
documentation: str = "http://docs.langflow.org/components/custom"
def build_config(self):
return {"param": {"display_name": "Parameter"},
"llm": {"display_name": "LLM"},
"prompt": {"display_name": "Prompt"},
"tool": {"display_name": "Tool"}}
def build(self, param: Data, llm: Data, prompt: Data, tool: Data) -> Data:
# Your code here
return param In the You can find more information about the structure and parameters of a custom component in the langflow codebase in the CustomComponent.py file. I hope this helps! If you have any other questions or need further clarification, feel free to ask. -Dosu Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
-
Hi! 👋 We are using other channels as our official means of communication with users. We apologize for the delayed response. Thank you for your understanding. Best regards, |
Beta Was this translation helpful? Give feedback.
-
I am creating a flow where the model is passed a prompt for it to generate code. The code is then executed to make sure it works and passed to another model for further refining. I am trying to create a custom component as an LLM runner for this. I am trying to pass the runner the LLM, prompt and tool for code execution however I keep getting this error:
" Error building node CustomComponent(ID:CustomComponent-dNNcg): 1 validation error for LLMChain
tool
extra fields not permitted (type=value_error.extra) "
This is the code I am using:
Does anyone know anything about this issue or any advice on how I can get the flow I want to work?
Beta Was this translation helpful? Give feedback.
All reactions