Commit graph

4,054 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
afca3fe3e7 🔧 chore(base.py): add teardown method to Engine class for proper cleanup of the database engine
🔧 chore(base.py): add logging statement to teardown method for debugging purposes
🔧 chore(base.py): call dispose method on database engine instance in teardown method to properly release resources
🔧 chore(base.py): set database engine instance to None in teardown method to ensure proper cleanup
2023-08-30 09:51:02 -03:00
Gabriel Luiz Freitas Almeida
3efecc8b9b 🐛 fix(manager.py): add unique session id to avoid multiple clients with the same id
🐛 fix(utils.py): pass session id to process_graph function to ensure unique session id for each client
🐛 fix(base.py): pass session id to setup_callbacks function to ensure unique session id for each client
2023-08-30 09:50:19 -03:00
Gabriel Luiz Freitas Almeida
55bd1dc6ec 🔧 chore(main.py): import and add startup and shutdown events for LangfuseInstance to improve plugin functionality
🔧 chore(__init__.py): add empty file to create plugins directory structure
2023-08-30 09:49:57 -03:00
Gabriel Luiz Freitas Almeida
9559f1d684 feat(langfuse.py): add temporary implementation of LangfuseInstance class
The LangfuseInstance class is a temporary implementation that will be replaced by a plugin system in the future. This class provides methods for creating, getting, updating, and tearing down an instance of Langfuse. It uses the Langfuse library and credentials from the settings module to create the instance. If no credentials are found, the instance is set to None. The update method resets the instance and creates a new one. The teardown method flushes the instance and sets it to None.
2023-08-30 09:49:38 -03:00
Gabriel Luiz Freitas Almeida
be7cb0763e 📝 docs(langfuse_integration.mdx): update Langfuse integration guide with detailed instructions and explanations
🔀 diff --git a/docs/docs/guides/langfuse_integration.mdx b/docs/docs/guides/langfuse_integration.mdx
🔀 index db23bbdc..51aba962 100644
🔀 --- a/docs/docs/guides/langfuse_integration.mdx
🔀 +++ b/docs/docs/guides/langfuse_integration.mdx
🔀 @@ -1,35 +1,49 @@
🔀 -import ThemedImage from "@theme/ThemedImage";
🔀 -import useBaseUrl from "@docusaurus/useBaseUrl";
🔀 -import ZoomableImage from "/src/theme/ZoomableImage.js";
🔀 -import ReactPlayer from "react-player";
🔀 -
🔀  # Integrating Langfuse with Langflow
🔀
🔀 +## Introduction
🔀 +
🔀 +Langfuse is an open-source tracing and analytics tool designed for LLM applications. Integrating Langfuse with Langflow provides detailed production traces and granular insights into quality, cost, and latency. This integration allows you to monitor and debug your Langflow's chat or APIs easily.
🔀 +
🔀  ## Step-by-Step Instructions
🔀
🔀  ### Step 1: Create a Langfuse account
🔀
🔀 -1. Go to [https://langfuse.com](https://langfuse.com) and click on the "Sign In" button in the top right corner.
🔀 +1. Go to [Langfuse](https://langfuse.com) and click on the "Sign In" button in the top right corner.
🔀  2. Click on the "Sign Up" button and create an account.
🔀 -3. Click on "Settings" and then on "Create new API keys"
🔀 +3. Once logged in, click on "Settings" and then on "Create new API keys."
🔀  4. Copy the Public key and the Secret Key and save them somewhere safe.
🔀 -   {/* Add env variables LANGFLOW_LANGFUSE_SECRET_KEY, LANGFLOW_LANGFUSE_PUBLIC_KEY and LANGFLOW_LANGFUSE_HOST to pass to CallbackHandler */}
🔀 +   {/* Add
2023-08-22 09:47:35 -03:00
Gabriel Luiz Freitas Almeida
c8d9c41f9a 🐛 fix(base.py): add support for langfuse callback to flush if present
 feat(base.py): add support for langfuse callback to flush if present when getting result and steps
2023-08-22 09:47:22 -03:00
Gabriel Luiz Freitas Almeida
75f042c388 📚 docs(sidebars.js): add "langfuse_integration" guide to the "Step-by-Step Guides" section for improved documentation coverage 2023-08-22 07:20:25 -03:00
Gabriel Luiz Freitas Almeida
4e7a993db3 Adds first version of docs 2023-08-21 22:18:55 -03:00
Gabriel Luiz Freitas Almeida
894dbdcd40 🔧 chore(base.py): improve error handling and error message when importing langfuse callback module
🚀 feat(base.py): add langfuse callback import type hint to ignore type checking for better compatibility with dynamic imports
2023-08-21 22:07:35 -03:00
Gabriel Luiz Freitas Almeida
6a974a4efd 🔧 chore(settings.py): add LANGFUSE_HOST environment variable to store the host URL for Langfuse API 2023-08-15 14:55:34 -03:00
Gabriel Luiz Freitas Almeida
73f02439b0 🔧 chore(base.py): add debug log messages for langfuse callback initialization and credentials check
🔧 chore(base.py): add debug log message for langfuse callback loaded
2023-08-15 14:54:38 -03:00
Gabriel Luiz Freitas Almeida
6fe486b164 🔧 chore(base.py): refactor setup_callbacks function to improve readability and maintainability
🔧 chore(base.py): refactor get_langfuse_callback function to improve readability and maintainability
🔧 chore(base.py): refactor get_result_and_steps function to improve readability and maintainability
🔧 chore(settings.py): add LANGFUSE_SECRET_KEY and LANGFUSE_PUBLIC_KEY optional settings
2023-08-15 12:46:54 -03:00
Gabriel Luiz Freitas Almeida
2d2641c285 🔧 chore(pyproject.toml): add langfuse dependency to improve language processing capabilities 2023-08-15 12:28:37 -03:00
Gabriel Luiz Freitas Almeida
5a490154e3
Merge branch 'main' into release 2023-08-15 13:16:00 +00:00
Rodrigo Nader
4c1b342a43 feat: Add documentation for various tools
- Added documentation for BingSearchRun, Calculator, GoogleSearchResults, GoogleSearchRun, GoogleSerperRun, and InfoSQLDatabaseTool components.
2023-08-15 10:14:24 -03:00
Gabriel Luiz Freitas Almeida
5140ae605d
CtrlBackspace fixed on Macbook (#765) 2023-08-15 13:09:11 +00:00
Gabriel Luiz Freitas Almeida
73c73dbcdd
Fix Duplicated CustomComponents (#766) 2023-08-15 13:08:43 +00:00
Gabriel Luiz Freitas Almeida
e63d6aa943 🐛 fix(endpoints.py): fix comparison of path variable to string in get_all() function to prevent duplicate processing of paths 2023-08-15 10:04:40 -03:00
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
Lucas Oliveira
f1f958a7ae CtrlBackspace fixed on Macbook 2023-08-15 08:52:07 -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
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
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
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
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