FlowiseAI / Flowise

Drag & drop UI to build your customized LLM flow
https://flowiseai.com
Apache License 2.0
31.81k stars 16.58k forks source link

[Allow setting LANGCHAIN_HIDE_INPUTS and LANGCHAIN_HIDE_OUTPUTS for Langsmith] #2845

Open dentro-innovation opened 4 months ago

dentro-innovation commented 4 months ago

Describe the feature you'd like It's possible with langchain to set following environment variables:

If these env vars are set to true, no input text or output text is tracked in langsmith. The runs itself are still tracked, also tool usage is shown, altough without its inputs and outputs.

This behavior is great for applications that deal with personally identifiable data (PII data), such as names and email addresses. PII data is stripped, while it's still possible to observe the general flows of e.g. an agent.

Currently in Flowise version 1.8.4 it's neither possible to set those env vars in .env to have an effect, nor is there an option in the UI to disable text tracking:

image

Additional context Link to langchain docs regarding this topic: https://docs.smith.langchain.com/how_to_guides/tracing/mask_inputs_outputs

dentro-innovation commented 3 months ago

Additional:

Allow me to send my traces to the EU hosting of langsmith.

That can be done by setting the env var LANGCHAIN_ENDPOINT to https://eu.api.smith.langchain.com instead of the default https://api.smith.langchain.com, i.e.:

LANGCHAIN_ENDPOINT=https://eu.api.smith.langchain.com

This would allow Flowise users to increase their GDPR compliance.

Resources: https://docs.smith.langchain.com/reference/cloud_architecture_and_scalability

dentro-innovation commented 3 weeks ago

So my previous comment already about the EU instance is already working, thanks a lot!

Now what's missing is the possibility to enable LANGCHAIN_HIDE_INPUTS and LANGCHAIN_HIDE_OUTPUTS.

Right now we're working with a customer that doesn't want us to track the plain text messages, but tracking the runs with some metadata is fine privacy wise - However Flowise doesn't allow setting LANGCHAIN_HIDE_INPUTS / LANGCHAIN_HIDE_OUTPUTS !

I'm sure it won't take you more than an hour to allow setting those two flags, e.g. next to the on / off button: image

Also tagging @HenryHengZJ for visibility