Skip to content

reflex-dev/chat-template-demo

 
 

Repository files navigation

Chat with Reflex Docs

This is a demo app made using the Chat template from Reflex, Llama Index, Traceloop and OpenAI.

Prerequisites

  • 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.

Requirements

reflex>=0.4.7
llama-index
traceloop-sdk

Steps to Run

Environment Variables

export TRACELOOP_API_KEY=12345yourkey
export OPENAI_API_KEY=sk-your-key

Run the Reflex App

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.

Monitor Your App on Traceloop

Go to the traceloop dashboard, you can see stats such as the tokens and models used for OpenAI calls.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%