From 7d5676d5849759456eb6e1a34cb7ebdb8f6cc820 Mon Sep 17 00:00:00 2001 From: WilliamMRS Date: Tue, 12 Nov 2024 14:06:19 +0100 Subject: [PATCH] made tracing with langsmith be configurable in .env --- .env.example | 1 - core/main.py | 2 +- docker-compose.yml | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 48e659f..d95d9e6 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,5 @@ OPENAI_API_KEY=your_api_key LANGSMITH_API_KEY=your_langsmith_api_key #Find it here: https://smith.langchain.com -PORT=3000 #FLASK_ENV=development #Optional if you want docker to reload flask when you save your code. #LANGSMITH_API_KEY=your_api_key #optional. Let's you debug using langsmith #LANGCHAIN_PROJECT=your_project_name #pops up in langsmith dashboard diff --git a/core/main.py b/core/main.py index 9669a96..e9ba35f 100644 --- a/core/main.py +++ b/core/main.py @@ -192,7 +192,7 @@ def get_chat_history(): return {"chat_history": []} if __name__ == '__main__': - socketio.run(app, debug=True, host='0.0.0.0', port=PORT, allow_unsafe_werkzeug=True) + socketio.run(app, debug=True, host='0.0.0.0', port=3000, allow_unsafe_werkzeug=True) # Hardcoded port, same as docker compose and dockerfile # hello # TODO say hello back to whoever wrote this \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 455a5de..ebc0cfb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: FLASK_ENV: ${FLASK_ENV} # Autorestarts flask when code changes are detected OPENAI_API_KEY: ${OPENAI_API_KEY} LANGSMITH_API_KEY: ${LANGSMITH_API_KEY} - LANGCHAIN_TRACING_V2: "true" + LANGCHAIN_TRACING_V2: ${LANGCHAIN_TRACING_V2} LANGCHAIN_ENDPOINT: "https://api.smith.langchain.com" LANGCHAIN_PROJECT: ${LANGCHAIN_PROJECT} PERPLEXITY_API_KEY: ${PERPLEXITY_API_KEY}