Commit graph

4,015 commits

Author SHA1 Message Date
Lucas Oliveira
685ac70e90 disabled ZoomOnDoubleClick 2023-08-15 12:31:17 -03:00
Lucas Oliveira
fe7239b577 Disabled Pan On Pinch 2023-08-15 12:30:39 -03:00
Lucas Oliveira
8529c379e1 Disabled zoom and pan when on view mode 2023-08-15 12:29:19 -03:00
Lucas Oliveira
3667f4812e Fixed bug: flow not showing 2023-08-15 12:21:20 -03:00
Lucas Oliveira
81dba95720 Added view option to LangFlow 2023-08-15 12:16:32 -03:00
Rodrigo Nader
823b140181 feat: Add documentation for various tools
- Added documentation for BingSearchRun, Calculator, GoogleSearchResults, GoogleSearchRun, GoogleSerperRun, and InfoSQLDatabaseTool components.
2023-08-13 20:14:02 -03:00
Gabriel Luiz Freitas Almeida
9bc616672c
Fixes a bug in fix_memory_keys, Adds OpenAI ConversationalAgent (#753) 2023-08-10 17:50:26 -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
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
Gabriel Luiz Freitas Almeida
38b6831b57 feat(Metaphor.py): add MetaphorToolkit component to langflow toolkit
The MetaphorToolkit component is added to the langflow toolkit. It provides functionality for searching metaphors using the Metaphor API. The component includes three tools: search, get_contents, and find_similar. The search tool allows users to search for metaphors using a query. The get_contents tool retrieves the contents of a webpage based on the ids returned from the search tool. The find_similar tool finds search results similar to a given URL returned from the search tool.

The MetaphorToolkit component is still in beta and requires a Metaphor API key to function. The API key is stored securely and can be configured in the field_config of the component. For more information, refer to the documentation: [Metaphor Toolkit Documentation](https://python.langchain.com/docs/integrations/tools/metaphor_search)
2023-08-09 15:29:11 -03:00
Gabriel Luiz Freitas Almeida
d16d916952 🐛 fix(custom_component.py): improve parsing of return type in CustomComponent class
 feat(custom_component.py): add support for parsing return type when it is a Union of types in CustomComponent class
2023-08-09 15:28:39 -03:00
Gabriel Luiz Freitas Almeida
639550d537 🔧 chore(pyproject.toml): add metaphor-python dependency to improve code analysis and documentation generation
⬆️ feat(pyproject.toml): upgrade black dependency to version 23.1.0 for code formatting
2023-08-09 15:26:51 -03:00
Gabriel Luiz Freitas Almeida
b3e512f55f feat(PromptRunner.py): add PromptRunner component to run a Chain with a given PromptTemplate
 feat(Vectara.py): add VectaraComponent to implement Vector Store using Vectara
🔧 chore(vectorstores): add empty __init__.py file to the vectorstores directory
2023-08-09 14:37:20 -03:00
Gabriel Luiz Freitas Almeida
72f88e1a16 🐛 fix(custom_component.py): handle return_type as a Union[type1, type2] and add support for multiple return types in add_base_classes function
🐛 fix(types.py): handle multiple return types in add_base_classes function and raise HTTPException with appropriate error message if return type is invalid
2023-08-09 14:36:45 -03:00
Gabriel Luiz Freitas Almeida
c9e489a195 🔖 chore(pyproject.toml): bump version from 0.4.5 to 0.4.6 for langflow package 2023-08-09 13:50:14 -03:00
anovazzi1
21fb5aad6c style(headerComponent): capitalize the first letter of "The" in "Join The Waitlist" for consistency and readability 2023-08-09 10:59:50 -03:00
anovazzi1
181beb810e style(headerComponent): capitalize the first letter of "join the waitlist" to improve consistency and readability 2023-08-09 10:44:25 -03:00
anovazzi1
24cc59674b chore(headerComponent): remove commented out code for waitlist link
The commented out code for the waitlist link in the header component has been removed. This code was not being used and was cluttering the codebase.
2023-08-09 10:28:50 -03:00
Gabriel Luiz Freitas Almeida
3b04048e75 🔥 refactor(custom-component.mdx): remove width property from style to improve responsiveness and avoid fixed width 2023-08-09 09:49:25 -03:00