Skip to content

Commit

Permalink
Merge pull request #10 from piyook/dev
Browse files Browse the repository at this point in the history
chore(App): fix overflow issues and minor readme update
  • Loading branch information
piyook committed Mar 15, 2024
2 parents ecef607 + 1583660 commit cfbd3d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Specialised Chatbot
# A Subject Specialised Chatbot

### LLM Retrieval Augmented Generation using LangChain and OpenAI in NextJS
### LLM Retrieval Augmented Generation using LangChain and OpenAI in NextJS/React

![chatbot-demo-1](https://github.com/piyook/chatbot-demo-next/assets/51154763/de157268-8426-493e-af14-f1ba67c1159c)

### About

The project uses LangChain to build prompt chains and interact with OpenAI using Retrieval Augmented Generation (RAG). Context is imported by splitting a **_reference document_** containing information the chatbot should know, and vectorising and embedding this in a local store for use with RAG user queries. Chat history is enabled to allow follow up questions.
The project uses LangChain to build prompt chains and interact with OpenAI using Retrieval Augmented Generation (RAG). Context is imported by splitting a **_reference document_** containing information on a subject the chatbot should know about, and vectorising and embedding this in a local store for use with RAG user queries. Chat history is enabled to allow follow up questions.

LangSmith can also be used to log calls to OpenAI with the appropriate API keys. The project name can be set in the .env.local file using the PROJECT_NAME node process environment variable.

### Set-up

Clone the project and install dependencies.

Copy **.env.local.example** into a newly created **.env.local** file and insert your API Keys obtained from your OPENAI account and LangChain API Keys fromyour LangChain account (if you want to use LangSmith to track your calls to the OpenAI API).
Copy **.env.local.example** into a newly created **.env.local** file placed in the same project root folder. Insert your API Keys obtained from your OPENAI account and LangChain API Keys fromyour LangChain account (if you want to use LangSmith to track your calls to the OpenAI API).

This is a demo project only and while OpenAI will be contacted using server components (so API keys wont be exposed in browser based client-side components), production code would need better secrets protection (such as injecting keys using Github Secrets and Actions or for cloud deployments using secret managers such as AWS Secrets Manager).
This is a demo project only and while OpenAI will be contacted using React server components (so API keys wont be exposed in browser based client-side components), production code would need better secrets protection (such as injecting keys using Github Secrets and Actions or for cloud deployments using secret managers such as AWS Secrets Manager).

### Using

Expand Down
1 change: 0 additions & 1 deletion src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ body {
width: 100%;
background-color: rgb(33, 33, 33) !important;
height: 100vh;
overflow: hidden;
}

.IntroBox {
Expand Down

0 comments on commit cfbd3d3

Please sign in to comment.