This is a demo app made using the Chat template from Reflex, Llama Index, Traceloop and OpenAI.
- OpenAI API key: the app uses OpenAI embedding and chat functionality.
- Traceloop API key: the app traces the function call to OpenAI and export to Traceloop dashboard.
reflex>=0.4.7
llama-index
traceloop-sdk
export TRACELOOP_API_KEY=12345yourkey
export OPENAI_API_KEY=sk-your-key
This app is based on Reflex framework. In the top level directory (this directory has a file named rxconfig.py
), run the following commands to run the app:
reflex init
reflex run
Then go to https://localhost:3000
or another URL shown in the terminal when the app is running. Chat and get the results based on the reflex documentation.
Go to the traceloop dashboard, you can see stats such as the tokens and models used for OpenAI calls.