We have provided a script to add a feature flag to your LangSmith tenant. The script is located in the scripts
directory of this repository.
Ensure you have the following tools/items ready.
- PostgreSQL client
- PostgreSQL database connection:
- Host
- Port
- Username
- If using the bundled version, this is
postgres
- If using the bundled version, this is
- Password
- If using the bundled version, this is
postgres
- If using the bundled version, this is
- Database name
- If using the bundled version, this is
postgres
- If using the bundled version, this is
- Connectivity to the PostgreSQL database from the machine you will be running the migration script on.
- If you are not using the bundled version in the image, you may need to port forward the postgresql service to your local machine.
- Run
kubectl port-forward svc/langsmith-postgres 5432:5432
to port forward the postgresql service to your local machine.
- The name of the feature flag you want to add.
- The id of the tenant you want to add the feature flag to.
Run the following command to run feature flag script
sh add_feature_flag_to_tenant.sh <postgres connection url> <tenant id> <feature flag name>
For example, if you are using the script directly with port-forwarding, the command would look like:
sh add_feature_flag_to_tenant.sh "postgres://postgres:postgres@localhost:5432/postgres" "6a389372-6e79-5cd0-bf66-d70249fb676e" "conversation_view_enabled"
If you visit the Langsmith UI, you should now see the feature flag enabled.