GenerativeAIExamples
GenerativeAIExamples copied to clipboard
Fix callback handlers in tracing.py
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'