GenerativeAIExamples icon indicating copy to clipboard operation
GenerativeAIExamples copied to clipboard

Fix callback handlers in tracing.py

Open lbliii opened this issue 1 year ago • 0 comments

The imported observability tools don't seem to have been included and cause the chain-server container to crash stating that the module can't be found. As a workaround, I've added locally defined callbacks to unblock the use of the "Try it Now!" demo experience. I can now successfully load this demo from my Docker Desktop with these changes.

from RAG.tools.observability.langchain import opentelemetry_callback as langchain_otel_cb
from RAG.tools.observability.llamaindex import opentelemetry_callback as llama_index_otel_cb

Error in container:

from RAG.tools.observability.langchain import opentelemetry_callback as langchain_otel_cb
2024-11-09 11:38:58 ModuleNotFoundError: No module named 'RAG.tools.observability'

lbliii avatar Nov 09 '24 20:11 lbliii