This repo includes a demo chat application built using OpenAI & Langchain that is pre-instrumented for observation with Okahu AI Observability cloud. You can fork this repo and run the app in Github Codespaces to get started quickly.
To try this chatbot
pip install -r requirement.txt
pip uninstall python-magic
pip install -r requirement.txt
You'll need
This application is an interactive chatbot that answers questions about coffee and built with a RAG design pattern. Workflow is a python program using Langchain LLM orchestration framework. The vector dataset is built using text-embedding-3-large embedding model from OpenAI from a local dataset about coffee. The vector data is stored in a local filebased Chroma vectorDB. The app uses OpenAI gpt-4o-mini model for inference.
To try Okahu from the Github Codespace
Run the pre-instrumented chatbot app with following command from top level directory
python lc-openai-with-okahu.py
View the workflow discovered by Okahu AI Observability Cloud with following commands with your Okahu API key
curl --location --request PUT 'https://api.okahu.ai/api/v1/discovery' --header 'x-api-key: <YOUR_OKAHU_API_KEY>;'
curl --location 'https://api.okahu.ai/api/v1/components' --header 'x-api-key: <YOUR_OKAHU_API_KEY>;'
Check out Okahu AI Observability Cloud API docs here
$ python lc-openai-with-okahu.py
Ask a coffee question [Press return to exit]: What is an americano?
An americano is a type of coffee drink that is made by diluting an espresso shot with hot water at a 1:3 to 1:4 ratio, resulting in a drink that retains the complex flavors of espresso, but in a lighter way.
To run the chatbot app without Okahu instrumentation, use the command python lc-openai.py
To understand how Okahu instrumentation works, compare the lc-openai.py and lc-openai-with-okahu.py