Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test code for traceloop #183

Open
gyliu513 opened this issue Jul 24, 2024 · 0 comments
Open

test code for traceloop #183

gyliu513 opened this issue Jul 24, 2024 · 0 comments

Comments

@gyliu513
Copy link
Owner

--- a/packages/sample-app/sample_app/langchain_app.py
+++ b/packages/sample-app/sample_app/langchain_app.py
@@ -1,11 +1,16 @@
+from dotenv import load_dotenv
+load_dotenv()
+
 from langchain.schema import SystemMessage, HumanMessage
 from langchain.prompts import ChatPromptTemplate, HumanMessagePromptTemplate
 from langchain_community.chat_models import ChatOpenAI
 from langchain.chains import LLMChain, SequentialChain, TransformChain

 from traceloop.sdk import Traceloop
+import os
+os.environ['OTEL_EXPORTER_OTLP_INSECURE'] = 'True'

-Traceloop.init(app_name="langchain_example")
+Traceloop.init(app_name="langchain_example_0528", disable_batch=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant