Commit graph

13,118 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
8d1e4ff059
ci: add 'test' job to run Typescript and Python tests (#2489)
* chore: update workflow_dispatch in Python and TypeScript test workflows

* feat(release.yml): add a new 'test' job to run Typescript and Python tests before releasing Langflow Main to ensure code quality and stability. Update dependencies to include Typescript and Python test workflows.
2024-07-02 12:40:57 -07:00
Lucas Oliveira
629df8fef3
fix: create data component not saving old values on check and save (#2483)
Fixed Create Data component to maintain old values and use new code structure

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-02 12:20:52 -07:00
Gabriel Luiz Freitas Almeida
e424076677
fix(service.py): improve handling of environment variables in DatabaseVariableService to update or create variables based on changes in secret_key (#2481)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-02 12:19:47 -07:00
Nicolò Boschi
fb29b248be
fix: run_flow_from_json circular dependency (#2485)
* fix: run_flow_from_json circular dependency

* fix: run_flow_from_json circular dependency

* fix: run_flow_from_json circular dependency

* fix mypy

* fix mypy

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-02 12:16:12 -07:00
Gabriel Luiz Freitas Almeida
e244157be6
chore: update targetUrl in semantic.yml (#2480) 2024-07-02 12:13:39 -07:00
Gabriel Luiz Freitas Almeida
5f0e74e5d2
fix(tracing_service): use correct trace name and attribute name (#2484)
* fix(tracing_service): use correct trace name and attribute name

* fix: update tracing_service attribute name in LCModelComponent

* feat: add trace_name property in CustomComponent

* fix: update trace_name usage in Component build method

* feat: update log method in CustomComponent to use trace_name

* fix: update trace_name usage in Component build method

* feat(custom_component): add logs to CustomComponent

The `CustomComponent` class now includes a `_logs` attribute to store log messages. This attribute is initialized as an empty list in the constructor. The `log` method has been updated to accept an optional `name` parameter, which allows specifying a custom name for the log message. If no name is provided, a default name is generated based on the number of logs already stored.

This change enhances the logging functionality of the `CustomComponent` and provides more flexibility in managing log messages.

* feat(tracing_service): add logs to TracingService

This commit adds a `_logs` attribute to the `TracingService` class to store log messages. The attribute is initialized as a defaultdict of lists in the constructor. The `add_log` method has been updated to append logs to the corresponding trace name in the `_logs` dictionary. This change enhances the logging functionality of the `TracingService` and allows for better management of log messages.

* chore(tracing_service): improve error handling in stop method

* refactor(tracing/service.py): update _logs data structure to support both Log objects and generic dictionaries for flexibility in handling different types of data

refactor(tracing/service.py): add conditional check to only add metadata if it is provided for better control over the information being added

* refactor: update build_model method return type annotation

* refactor(CohereModel.py): update return type of build_model method to only LanguageModel for clarity and consistency

* chore(GroqModel.py): add stop_sequences parameter to GroqModel query method

* refactor(AstraDB.py): reorganize imports and update cached_vectorstore type

* refactor: update cached_vectorstore type and input order in CassandraVectorStoreComponent

* chore(GroqModel.py): remove unused stop_sequences parameter in GroqModel query method
2024-07-02 11:49:27 -07:00
Nicolò Boschi
0853056ee1
fix(security): require langchain-experimental>=0.0.61 (#2476)
* security: require langchain-experimental>=0.0.61

* security: require langchain-experimental>=0.0.61
2024-07-02 18:09:21 +02:00
Nicolò Boschi
30c369f064
feat(cassandra/astradb): hybrid search support (#2396)
* cassandra/astradb: hybrid search support

* fix

* fix
2024-07-02 16:09:11 +02:00
João Pedro Miranda C. Hluchan
805df8298a
fix: resolve Model Issues and add huggingface dependency (#2339)
* chore: adding default values to Azure OpenAI mandatory component

* fix: huggingface model component:
  - Change Huggingface-hub version from 0.20.0 to 0.22.0;
  - Internal model_id resolver not working, create a field to model_id;

* feat: add HuggingFace as extra dependency

* chore: remove redundant atribution on children

* fix: remove user environment variables from ChatLiteLLMModelComponent

---------

Co-authored-by: joaoguilhermeS <j.guilherme.s.oliveira2@gmail.com>
2024-07-02 14:04:26 +00:00
Nicolò Boschi
2787bec4fb
ci: skip tests with openai key required (#2477)
* ci: skip tests with openai key required

* ci: skip tests with openai key required

* ci: skip tests with openai key required

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-02 06:20:13 -07:00
Nicolò Boschi
b44e43a5b6
fix(frontend): do not use backend url in <img> (#2424)
* fronted: do not use backend url in <img>

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-02 15:19:20 +02:00
Nicolò Boschi
9bc683bdc7
fix(bedrock): fix error 'Key cache already exists' (#2423)
* bedrock: fix error 'Key cache already exists'

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-02 15:19:08 +02:00
Nicolò Boschi
0494bc2122
fix: azure openai model component: resource not found (#2426)
* fix azure openai model component: resource not found

* type

* type

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-02 15:18:47 +02:00
Nicolò Boschi
6ef7776004
fix(astradb): make fields required (#2428)
* astradb: make fields required

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-02 15:18:34 +02:00
Nicolò Boschi
653be0b358
fix (astra/cassandra): avoid duplicated ingestion (#2455)
* astra/cassandra: avoid duplicated ingestion

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-02 13:11:17 +00:00
Lucas Oliveira
c1947a0192
Fix Global Components bug (#2478)
* removed unused console.logs

* Fixed load_from_db not being updated
2024-07-02 13:10:48 +00:00
Igor Carvalho
7653b5e2f0
fix: ctrl f overriding browser ctrl f when editing node (#2358)
* Fix: Ctrl F overriding browser ctrl f when editing node

* Refactor: use noflow class instead of isThereModal function

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
2024-07-02 12:26:21 +00:00
Gabriel Luiz Freitas Almeida
26a71e1c36
ci: add auto_merge_enabled to PR activity types and concurrency settings (#2471)
* ci: add auto_merge_enabled to pr activity types

* fix  (auto-update.yml): remove 'dev' branch from trigger to run workflow on 'main' branch pushes only

fix (js_autofix.yml): remove unnecessary push trigger for 'main' branch in workflow to run on specific file changes only

* ci: Update concurrency settings in CI workflows
2024-07-01 18:45:15 -07:00
Gabriel Luiz Freitas Almeida
32e12cf72a
refactor: move langflow api tests into integration tests (#2469) 2024-07-01 15:25:56 -07:00
Gabriel Luiz Freitas Almeida
4dda82609e
ci: remove merge_group from workflows (#2467)
Remove the merge_group configuration from the workflows to simplify the CI pipeline.
2024-07-01 15:03:23 -07:00
Nicolò Boschi
f2bf62e284
ci: fix mypy checks (#2431)
* ci: fix mypy

* ci: fix mypy

* ci: fix mypy

* run fe checks

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-01 14:42:14 -07:00
Nicolò Boschi
27a4b90cdd
docs: add datastax hosted langflow (#2452)
* readme: add datastax hosted langflow

* readme: add datastax hosted langflow

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-01 14:40:26 -07:00
Gabriel Luiz Freitas Almeida
6259269105
ci: add lint commit workflow for pull requests (#2463)
* chore: Add lint commit workflow for pull requests

* chore: Update commit message prefix and include scope for dependabot.yml

* ci: remove pr-checker

* chore: Update commitlint-github-action to version 5

* chore: Remove lint-commit workflow and add semantic.yml configuration
2024-07-01 14:33:49 -07:00
Cristhian Zanforlin Lousa
f70106aaec
bugfix: fix crashing langflow when keypairlistcomponent advanced opens (#2462) 2024-07-01 20:30:32 +00:00
Cristhian Zanforlin Lousa
e8517e067a
removing duplicate tests from frontend (#2459)
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-07-01 20:24:28 +00:00
Gabriel Luiz Freitas Almeida
8bcba2d414
chore: Update ruff command in py_autofix.yml to use 'ruff check' before 'ruff --fix-only' (#2461) 2024-07-01 12:36:06 -07:00
Gabriel Luiz Freitas Almeida
b82b18fc3f
chore(deps): bump install-pinned/ruff from 6b463d795ce39011cc004438ae507ae56235e12a to b52a71f70b28264686d57d1efef1ba845b9cec6c (#2454)
Bumps [install-pinned/ruff](https://github.com/install-pinned/ruff) from
6b463d795ce39011cc004438ae507ae56235e12a to
b52a71f70b28264686d57d1efef1ba845b9cec6c.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b52a71f70b"><code>b52a71f</code></a>
update README.md (ruff 0.5.0)</li>
<li><a
href="1c20df8118"><code>1c20df8</code></a>
update pins (ruff 0.5.0)</li>
<li>See full diff in <a
href="6b463d795c...b52a71f70b">compare
view</a></li>
</ul>
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)

</details>
2024-07-01 18:39:57 +00:00
Gabriel Luiz Freitas Almeida
4a13afc13b
Merge branch 'main' into dependabot/github_actions/install-pinned/ruff-b52a71f70b28264686d57d1efef1ba845b9cec6c 2024-07-01 15:31:37 -03:00
Gabriel Luiz Freitas Almeida
f98fea61b3
Bugfixes and migrate Messages table to the database (#2457)
This PR changes the Messages table in the MonitorService to use the main
database.
It also fixes many bugs including how TracingService calls are made in
the API, Graph ordering, Group component run id and many other fixes.
2024-07-01 18:23:13 +00:00
Gabriel Luiz Freitas Almeida
f06657d985 Merge branch 'dev' into dev_to_main 2024-07-01 15:04:56 -03:00
Dmitry Galanov
bd20885a3b (fix) Add gpt4 to openai_constants.py (#2416)
(fix) Add gpt4 to openai_constants

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-07-01 13:53:55 -03:00
Cristhian Zanforlin Lousa
b0fcb91d35 add a new test for a huge flow -> decisionFlow (#2456)
* add test to decision flow

* add test to decision flow

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-01 13:53:55 -03:00
ming
3015d2f138 loguru support standout logging with json and csv (#2415)
support standout logging with json and csv

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-01 13:53:55 -03:00
Lucas Oliveira
b31c5e6b4a Fix Global Variables (#2430)
* chore: update linting workflows to include dev branch in merge_group

* Update README.md

Add 1.0 banner

* Update README.md

* chore: update package versions in pyproject.toml files

* Added db value to every onChange on parameters

* Refactored global variables to find variables on the first render, and to execute just one onChange to update both values and db

* Changed group recursion function to include check for global variables already applied or outdated

* Removed already inserted component check for default fields on global variables

* Fixed import error

* Added required parameters to update node on drop

* Removed check for unused hardcoded name

* Added global variables handling on nodes when adding a flow

* Fixed maximum update depth when deleting used global variable

* Fixed type error on addNewVariableButton modal

* Fixed openai api key on starter flows

* Fixed values to get the .env values by default on the starter projects

* Formatted flows

* fix erros reported by mypy

* [autofix.ci] apply automated fixes

* 🐛 (prototypes/__init__.py): fix missing comma in the list of imported components to prevent syntax error

* chore: Fix type hinting in ConditionalRouterComponent

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-01 13:53:55 -03:00
Gabriel Luiz Freitas Almeida
fd1c5cc84e ♻️ (code_parser.py): remove redundant condition that caused Component to not be parsed (#2406)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-01 13:53:55 -03:00
Gabriel Luiz Freitas Almeida
6a6bb3e13a fix: Add LanguageModel to field_typing module (#2410)
* feat: Add LanguageModel to field_typing module

* chore: Fix type annotations in model build methods

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-01 13:53:55 -03:00
anovazzi1
607e167cc3 fix playground button on store (#2417)
* fix playground on store

* [autofix.ci] apply automated fixes

* Format code

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-01 13:53:55 -03:00
anovazzi1
896c66813f fix name on EditNodeModal (#2434)
* fix name on EditNodeModal

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-01 13:53:55 -03:00
Gabriel Luiz Freitas Almeida
73e38a0c73 chore: Refactor authentication key generation (#2443)
Refactor the `ensure_valid_key` function in `utils.py` to improve the generation of a valid key for authentication. The function now checks if the input key is too short and generates a random key if necessary. Additionally, the key is now URL-safe base64-encoded. This change enhances the security and reliability of the authentication process.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-01 13:53:55 -03:00
Gabriel Luiz Freitas Almeida
cd3f6c4c52 chore: fix lint errors (#2445)
* chore: Fix type hinting in ConditionalRouterComponent

* refactor: Update PassComponent to PassMessageComponent
2024-07-01 13:53:55 -03:00
anovazzi1
cc53ce4380 format code 2024-07-01 13:53:55 -03:00
anovazzi1
71f3bfcf51 feat: convert non-object rows to array of objects in DataOutputComponent 2024-07-01 13:53:55 -03:00
anovazzi1
69a843aa66 code format 2024-07-01 13:53:55 -03:00
anovazzi1
ee9212e8ee chore: Update proxy IDs on group node outputs to ensure consistency 2024-07-01 13:53:55 -03:00
autofix-ci[bot]
e5b7477a90 [autofix.ci] apply automated fixes 2024-07-01 13:53:55 -03:00
igorrCarvalho
ad3c47b8fd fix: Tweaks tab dissapearing with hook component 2024-07-01 13:53:55 -03:00
anovazzi1
a008f8a3de format code 2024-07-01 13:53:55 -03:00
anovazzi1
5cbe19934e fix edit method on messages 2024-07-01 13:53:55 -03:00
autofix-ci[bot]
6def02d3d1 [autofix.ci] apply automated fixes 2024-07-01 13:53:55 -03:00
igorrCarvalho
87cf28e158 Refactor: enable node copy for multiple selection 2024-07-01 13:53:55 -03:00