Spaces:
Sleeping
Sleeping
Update langfuse_setup.py
Browse files- langfuse_setup.py +10 -0
langfuse_setup.py
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import base64
|
| 3 |
+
|
| 4 |
+
LANGFUSE_PUBLIC_KEY="pk-lf-d10f899a-c4cc-43d4-b358-c8e6130c2794"
|
| 5 |
+
LANGFUSE_SECRET_KEY="sk-lf-13ac0b14-8ad1-4343-801c-9bc113618b20"
|
| 6 |
+
LANGFUSE_AUTH=base64.b64encode(f"{LANGFUSE_PUBLIC_KEY}:{LANGFUSE_SECRET_KEY}".encode()).decode()
|
| 7 |
+
|
| 8 |
+
os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"] = "https://cloud.langfuse.com/api/public/otel" # EU data region
|
| 9 |
+
# os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"] = "https://us.cloud.langfuse.com/api/public/otel" # US data region
|
| 10 |
+
os.environ["OTEL_EXPORTER_OTLP_HEADERS"] = f"Authorization=Basic {LANGFUSE_AUTH}"
|