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

📝 (utils.py): Add get_flow function and update Python API code #2075

Merged
merged 5 commits into from
Jun 5, 2024

Conversation

ogabrielluiz
Copy link
Contributor

📝 (utils.py): Remove unused 'port' parameter from upload functions
📝 (utils.py): Update upload function to use Langflow host URL and remove port parameter
📝 (utils.py): Update upload_file function to use Langflow host URL and port number
📝 (utils.py): Update function descriptions and variable names for clarity and consistency
📝 (model.py): Remove 'folder_id' field from FlowBase model in langflow services database

This commit adds a new function called `upload_file` to the `load/utils.py` module. This function allows users to upload a file to the storage service and returns the file path. It takes in parameters such as `file_path`, `host`, `port`, `flow_id`, `components`, and `tweaks`. The function makes use of the `upload` function to send a POST request to the storage service API and handle the response.

The `upload_file` function is useful for scenarios where users need to upload files to the flow and associate them with specific components. It provides flexibility by allowing users to specify the components that require the file and any tweaks that should be applied to the file.

This feature enhances the functionality of the codebase and improves the overall user experience when working with file uploads in the application.
…gflow

📝 (utils.py): Remove unused 'port' parameter from upload functions
📝 (utils.py): Update upload function to use Langflow host URL and remove port parameter
📝 (utils.py): Update upload_file function to use Langflow host URL and port number
📝 (utils.py): Update function descriptions and variable names for clarity and consistency
📝 (model.py): Remove 'folder_id' field from FlowBase model in langflow services database
Copy link

vercel bot commented Jun 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langflow ❌ Failed (Inspect) Jun 5, 2024 5:27pm

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. python Pull requests that update Python code labels Jun 5, 2024
… it to other modules

📝 (utils.py): fix docstring formatting issue in get_flow function
@ogabrielluiz ogabrielluiz merged commit 80f6249 into dev Jun 5, 2024
9 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests that update Python code size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant