Skip to content

Commit

Permalink
made tracing with langsmith be configurable in .env
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamMRS committed Nov 12, 2024
1 parent adcc622 commit 7d5676d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 7d5676d

Please sign in to comment.