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
- Fork this repo and run in the Github Codespace
You'll need
- An OpenAI subscription and an API key to OpenAI developer platform
- An Okahu tenant and API key to Okahu AI Observability Cloud
- Copy the file config/config.ini.template to config/config.ini
- Edit the config/config.ini file to add the OpenAI API Key and Okahu API key and save
- Validate OpenAI with command
./coffee_app_openai.sh
- Validate your Okahu API key
curl --silent --location 'api.okahu.ai/api/v1/tenant' --header "x-api-key: ${OKAHU_API_KEY}" | jq .
- Setup OKAHU_API_KEY as an environment variable
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 multi-qa-mpnet-base-dot-v1 embedding model from Huggingface from a set of Wikipedia articles. The vector data is stored in a local filebased faiss vectorDB. The app uses OpenAI gpt-3.5-turbo model for inference.
To try Okahu from the Github Codespace
-
Run the pre-instrumented chatbot app with following command from top level directory
./coffee_client_openai_with_okahu.sh
-
View the workflow discovered by Okahu AI Observability Cloud with following commands with your Okahu API key
-
Discover all components
curl --silent --location 'https://api.okahu.ai/api/v1/discovery' --header "x-api-key: ${OKAHU_API_KEY}" | jq .
-
Get discovered components
curl --silent --location 'https://api.okahu.ai/api/v1/components' --header "x-api-key: ${OKAHU_API_KEY}" | jq .
Check out Okahu AI Observability Cloud API docs here
-
To do
To run the chatbot app without Okahu instrumentation, use the command ./coffee_client_openai.sh
To understand how Okahu instrumentation works, compare the coffee_rag_openai.py and coffee_rag_openai_with_okahu.py