Replies: 1 comment
-
🤖 Hello @DreF174! 👋 I'm Dosu, your friendly bot assistant. Not to worry, I'm here to help you navigate through bugs, answer your queries, and guide you in becoming a contributor to the Langflow project while you wait for a human maintainer. Let's get started, shall we? 😄 Yes, Langflow does support the use of external libraries when creating tools through the Python function tool. This is facilitated by the To use this attribute, you can modify the import importlib
class Function(BaseModel):
# ... existing code ...
def get_function(self):
"""Get the function"""
function_name = validate.extract_function_name(self.code)
# Import the specified libraries
if self.imports:
for lib in self.imports.split(','):
importlib.import_module(lib.strip())
return validate.create_function(self.code, function_name) In this code, The The The You can find more details in the Langflow codebase. I hope this helps! If you have any more questions, feel free to ask. 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.
-
Brand new at Langflow here. I am trying to create tools through the python function tool, however the functions I'm trying to use are using libraries outside of Langflow and thus don't have access to them. Is there a way to incorporate new libraries into Langflow? Any help is appreciated!
Beta Was this translation helpful? Give feedback.
All reactions