Commit graph

4,033 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
46fa1921e9 🔒 chore(poetry.lock): update anthropic package version to 0.3.9
🔒 chore(poetry.lock): update typing-extensions package version to >=4.5,<5
🔒 chore(poetry.lock): update cohere package version to 4.20.0

📦 chore(poetry.lock): update coverage package version to 7.3.0
🔀 chore(poetry.lock): update python-versions constraint to >=3.8

🚀 feat(coverage): update coverage package to version 7.3.0

The coverage package has been updated to version 7.3.0. This update includes new wheel files for various platforms and their corresponding hashes.

🔒 chore: update coverage package dependencies

The coverage package dependencies have been updated to version 7.3.0. This commit includes the updated wheel files and their corresponding hashes.

🔒 chore(poetry.lock): update ctransformers to version 0.2.22
🔒 chore(poetry.lock): update exceptiongroup to version 1.1.3
🔒 chore(poetry.lock): update google-cloud-aiplatform to version 1.30.1
🔒 chore(poetry.lock): update langsmith to version 0.0.22
🔒 chore(poetry.lock): update metaphor-python to version 0.1.14
🔒 chore(poetry.lock): update pandas-stubs to version 2.0.3.230814
🔒 chore(poetry.lock): update pypdf to version 3.15.1
🔒 chore(poetry.lock): update tenacity to version 8.2.3

🔒 chore(poetry.lock): update tornado version from 6.3.2 to 6.3.3 to fix security vulnerability
🔒 chore(poetry.lock): update types-pytz version from 2023.3.0.0 to 2023.3.0.1 to fix typing stubs
🔒 chore(poetry.lock): update validators version from 0.20.0 to 0.21.0 to improve data validation
🔒 chore(poetry.lock): update watchfiles version from 0.19.0 to 0.19.0 (no changes)
2023-08-15 09:16:06 -03:00
Gabriel Luiz Freitas Almeida
b6d063a0fd 🐛 fix(settings.py): convert Path object to string before appending to list to avoid type error
🐛 fix(settings.py): check if value is already in the list before appending to avoid duplicates
2023-08-15 09:15:28 -03:00
Gabriel Luiz Freitas Almeida
d0cee2cc09 Formatting 2023-08-14 21:07:54 -03:00
Gustavo Schaedler
cb47f7cf8e
Fix HumanMessagePromptTemplate bug (#763)
HumanMessagePromptTemplate and some other MessagePromptTemplates were
not built correctly.

This fixes SystemMessage Example.
2023-08-14 22:22:11 +01:00
Gabriel Luiz Freitas Almeida
e0f625e793 🐛 fix(utils.py): add condition to check if prompt has 'partial' attribute before calling it to prevent error 2023-08-14 17:17:57 -03:00
Gabriel Luiz Freitas Almeida
2144e1ec91 🐛 fix(types.py): handle case where prompt template is not present in PromptVertex
ℹ️ The code was modified to handle a case where the `template` attribute is not present in the `PromptVertex` class. If the `template` attribute is not found, the code checks if the `prompt` attribute is present and uses its `template` attribute instead. This change ensures that the code does not break when the `template` attribute is missing.
2023-08-14 17:16:54 -03:00
Gabriel Luiz Freitas Almeida
9df5e94195
Prevent Default on Ctrl + Backspace in ReactFlow (#706) 2023-08-14 19:42:29 +00:00
Cristhian Zanforlin Lousa
754d26633a 🐛 fix(constants.ts): add backtick (`) and backtick (´) to specialCharsRegex to include them as special characters 2023-08-14 16:39:22 -03:00
Cristhian Zanforlin Lousa
4522cd383e 🐛 fix(reactflowUtils.ts): fix bug with control+backspace key combination on Windows/Linux and Mac 2023-08-14 16:28:52 -03:00
Cristhian Zanforlin Lousa
a531cc6066 🔧 chore(reactflowUtils.ts): remove console.log statement for keydown event in handleKeyDown function
🐛 fix(reactflowUtils.ts): fix handleKeyDown function to properly handle special characters and backspace key
2023-08-14 15:58:26 -03:00
Cristhian Zanforlin Lousa
9acf9e39aa 🔧 fix(constants.ts): add specialCharsRegex constant to match special characters in strings
🔧 fix(reactflowUtils.ts): update handleKeyDown function to prevent deletion of block when a special character is the last character in the input value
2023-08-14 11:15:26 -03:00
Gabriel Luiz Freitas Almeida
0c689dcc16
Fixed bug on Export Modal (#751) 2023-08-13 20:47:44 +00:00
Lucas Oliveira
c37e1223fc Fixed variable names 2023-08-11 12:09:00 -03:00
Gabriel Luiz Freitas Almeida
b140bbc3ff 🔖 chore(pyproject.toml): update package version from 0.4.8 to 0.4.9 for release 2023-08-10 18:22:54 -03:00
Gabriel Luiz Freitas Almeida
343d829c25 🐛 fix(OpenAIConversationalAgent.py): fix typo in display name of Conversational Agent class
 feat(OpenAIConversationalAgent.py): add support for OpenAI API key and base URL in build method to enable API function calling
2023-08-10 18:15:41 -03:00
Gabriel Luiz Freitas Almeida
2e0de1926e 🐛 fix(endpoints.py): handle duplicate paths in settings.COMPONENTS_PATH to avoid processing the same path multiple times
🐛 fix(settings.py): convert Path objects to strings in settings.COMPONENTS_PATH to ensure consistency and avoid potential issues
2023-08-10 17:59:30 -03:00
Gabriel Luiz Freitas Almeida
cce3bd3305 Merge remote-tracking branch 'origin/main' into release 2023-08-10 17:45:51 -03:00
Gabriel Luiz Freitas Almeida
cc8212b336 🔖 chore(pyproject.toml): update package version from 0.4.7 to 0.4.8 for maintenance purposes 2023-08-10 17:44:14 -03:00
Gabriel Luiz Freitas Almeida
337dba208e
Adds OpenAIConversationalAgent (#746) 2023-08-10 17:41:43 -03:00
Gabriel Luiz Freitas Almeida
3792cbc8d7
Merge branch 'release' into fix_memory_on_agents 2023-08-10 17:41:31 -03:00
Lucas Oliveira
2436461f5d Fixed bug on Export Modal 2023-08-10 14:50:15 -03:00
Gabriel Luiz Freitas Almeida
dc6a5ac73a 🔄 refactor(popover.tsx): reorder exported components to improve readability and consistency 2023-08-10 13:46:57 -03:00
Gabriel Luiz Freitas Almeida
5cbb86b184 🐛 fix(utils.py): add UnbuiltObject class to improve code readability and maintainability
🐛 fix(base.py): change the error message when _built_object is None to provide more specific information and handle the case when _built_object is an instance of UnbuiltObject
2023-08-10 13:46:25 -03:00
Gabriel Luiz Freitas Almeida
7933667973 🚀 feat(constants.py): import AgentExecutor from langchain.agents.agent module to use it in LANGCHAIN_BASE_TYPES dictionary
🔀 chore(constants.py): remove unnecessary import statements
2023-08-10 13:45:58 -03:00
Gabriel Luiz Freitas Almeida
cc4008c861 🐛 fix(custom_component.py): fix incorrect usage of type_hint variable in if condition 2023-08-10 11:43:46 -03:00
Gabriel Luiz Freitas Almeida
85782efd54
Small fixes (#749) 2023-08-10 10:07:41 -03:00
Gabriel Luiz Freitas Almeida
fe5a35aa37 Merge remote-tracking branch 'origin/main' into release 2023-08-10 09:55:42 -03:00
Gabriel Luiz Freitas Almeida
2751b92b6b 🔖 chore(pyproject.toml): bump version from 0.4.6 to 0.4.7 for langflow package 2023-08-10 09:54:47 -03:00
Gabriel Luiz Freitas Almeida
45d1b34197
Improves CustomComponents Errors (#748) 2023-08-10 09:44:44 -03:00
Gabriel Luiz Freitas Almeida
df77ba81f7 🐛 fix(custom_component.py): fix condition to check if Optional type hint is used but not imported in the code 2023-08-10 09:24:10 -03:00
Gabriel Luiz Freitas Almeida
564634d36c 🐛 fix(directory_reader.py): handle SyntaxError when parsing code to prevent crashes
🐛 fix(directory_reader.py): return False if code is not valid Python to prevent false positives
🐛 fix(directory_reader.py): fix method name from is_type_hint_used_but_not_imported to _is_type_hint_used_in_args for consistency
🐛 fix(directory_reader.py): fix method name from is_type_hint_imported to _is_type_hint_imported for consistency
🐛 fix(directory_reader.py): fix return value of _is_type_hint_used_in_args method to return False if type hint is used but not imported
2023-08-10 09:23:36 -03:00
Gabriel Luiz Freitas Almeida
261e258ed4 🐛 fix(loading.py): make a copy of the params before modifying it to prevent unintended side effects 2023-08-10 09:23:02 -03:00
Gabriel Luiz Freitas Almeida
7b22fd2711
add waitlist button on header (#742) 2023-08-10 07:59:03 -03:00
Gabriel Luiz Freitas Almeida
b0a2258232 🔧 chore(OpenAIConversationalAgent.py): add display names for 'tools', 'memory', 'system_message', and 'max_token_limit' parameters to improve readability and user experience 2023-08-09 22:06:33 -03:00
Gabriel Luiz Freitas Almeida
33ef3b0a7e 🐛 fix(OpenAIConversationalAgent.py): ignore type errors for memory_key, system_message, prompt, agent, and tools variables
 feat(OpenAIConversationalAgent.py): add support for return_intermediate_steps parameter in AgentExecutor constructor to enable returning intermediate steps during conversation
2023-08-09 21:58:25 -03:00
Gabriel Luiz Freitas Almeida
1dcdc02e4f 🚀 feat(constants.py): import BaseChatMemory from langchain.memory.chat_memory module to add support for chat memory in custom interfaces 2023-08-09 21:49:20 -03:00
Gabriel Luiz Freitas Almeida
5d226d43d1 🐛 fix(OpenAIConversationalAgent.py): change parameter name from model_name to model to improve clarity and consistency 2023-08-09 21:48:40 -03:00
Gabriel Luiz Freitas Almeida
44f4fc1e62 feat(OpenAIConversationalAgent.py): add implementation of ConversationalAgent class for OpenAI conversational agent 2023-08-09 21:38:39 -03:00
Gabriel Luiz Freitas Almeida
31e02fe25c feat(ConversationalAgent.py): add ConversationalAgent component to handle conversational interactions using OpenAI's function calling API
This commit adds a new file `ConversationalAgent.py` to the `src/backend/langflow/components/agents` directory. The `ConversationalAgent` class is a custom component that represents a conversational agent capable of using OpenAI's function calling API.

The `ConversationalAgent` class has the following features:
- It inherits from the `CustomComponent` class.
- It has a `display_name` attribute set to "OpenaAI Conversational Agent".
- It has a `description` attribute set to "Conversational Agent that can use OpenAI's function calling API".
- It implements the `build_config` method to define the configuration options for the agent.
- It implements the `build` method to create an instance of the `AgentExecutor` class, which represents the agent's execution environment.
- The `build` method takes several parameters, including `model_name`, `tools`, `memory`, `system_message`, and `max_token_limit`.
- It uses the `ChatOpenAI` class from the `langchain.chat_models` module to create an instance of the OpenAI language model.
- It uses the `ConversationTokenBufferMemory` class from the `langchain.memory.token_buffer` module to handle conversation history and token buffering.
- It uses the `OpenAIFunctionsAgent` class from the `langchain.agents.openai_functions_agent.base` module to create an instance of the OpenAI functions agent.
- It returns an instance of the `AgentExecutor` class with the agent, tools, memory, verbose, and return_intermediate_steps parameters set.

📝 feat(__init__.py): add empty __init__.py file to the agents directory

This commit adds an empty `__init__.py` file to the `src/backend/langflow/components/agents` directory. The `__init__.py` file is necessary to make the `agents` directory a Python package.
2023-08-09 21:37:11 -03:00
Gabriel Luiz Freitas Almeida
2725e24ced 🚀 feat(constants.py): add BaseMemory to LANGCHAIN_BASE_TYPES to support custom memory implementation in Langchain interface
📝 WHY: The addition of BaseMemory to LANGCHAIN_BASE_TYPES allows for the customization of the memory component in the Langchain interface. This enables users to implement their own memory functionality according to their specific needs.
2023-08-09 21:11:00 -03:00
Gabriel Luiz Freitas Almeida
67f8bb9dab 🐛 fix(base.py): fix memory inputs only if langchain_object is not an instance of AgentExecutor to prevent unnecessary fix
🔀 chore(base.py): merge changes from langchain.agents.agent module to base module
2023-08-09 21:10:31 -03:00
Gabriel Luiz Freitas Almeida
79858561a6
Adds Join The Waitlist button, Vectara, Metaphor in Beta and other fixes (#744) 2023-08-09 17:51:47 -03:00
Gabriel Luiz Freitas Almeida
8c41415a32 🐛 fix(custom_component.py): handle case when return_type is None to prevent errors
🐛 fix(test_custom_component.py): update assertion to expect return_type as a list instead of a string
🐛 fix(test_vectorstore_template.py): update assertion to check if all vectorstores in settings are present in the response
2023-08-09 17:50:03 -03:00
Gabriel Luiz Freitas Almeida
30aad35cc6
Merge branch 'main' into release 2023-08-09 17:41:23 -03:00
Gabriel Luiz Freitas Almeida
8a599a85fe
Adds Vectara VectorStore and Metaphor Toolkit (#743) 2023-08-09 17:40:26 -03:00
Gabriel Luiz Freitas Almeida
e1407d0595 🔧 chore(Metaphor.py): refactor build method to accept additional parameters for improved configurability
🔧 chore(Metaphor.py): update search method to use the provided parameters for use_autoprompt and search_num_results
🔧 chore(Metaphor.py): update find_similar method to use the provided parameter for similar_num_results
2023-08-09 17:12:22 -03:00
Gabriel Luiz Freitas Almeida
89c3306512 🔒 chore(poetry.lock): update aiofiles version from 23.2.0 to 23.2.1 to fix a bug related to file support for asyncio
🔒 chore(poetry.lock): update dnspython version from 2.4.1 to 2.4.2 to fix a bug related to DNS toolkit
2023-08-09 15:53:45 -03:00
Gabriel Luiz Freitas Almeida
29766ecaf0 🐛 fix(Metaphor.py): ignore type error for importing Metaphor from metaphor_python
🐛 fix(Metaphor.py): ignore type error for returning a list with mixed types
🐛 fix(Vectara.py): add condition to check if documents and embedding are not None before creating Vectara instance
🐛 fix(CustomComponent.py): change return type of get_function_entrypoint_return_type to List[str] to match the actual return value
2023-08-09 15:53:18 -03:00
Gabriel Luiz Freitas Almeida
9bbdd9465b 🔨 refactor(Vectara.py): reorganize function parameters for better readability and maintainability
🔧 chore(Vectara.py): add "embedding" parameter to the build function to support custom embeddings in VectaraComponent
2023-08-09 15:47:22 -03:00
Gabriel Luiz Freitas Almeida
e5e23a1da6 🐛 fix(component.py): add support for "documentation" field in template_config to properly handle component documentation
🐛 fix(types.py): update_attributes function now updates frontend_node with "documentation" field from template_config
2023-08-09 15:32:41 -03:00