Skip to content

Repository files navigation

Chatbot

1. Install Dependencies

yarn install

2. Provide Keys

Find the .env file in the root of the repo. Keep the existing variables and add the following values

OPENAI_API_KEY=''
PINECONE_API_KEY=''
PINECONE_ENVIRONMENT=''

# Navigate to Indexes under your Project to retrieve the Index name
PINECONE_INDEX=''

3. Change Namespace**

Change the namespace in these files to the appropriate name.

In utils/server/context.ts

const context = await getContext(lastMessage.content, 'KPFellows4', 10000, 0.7, false) as ScoredVector[]
const context = await getContext(lastMessage.content, 'YOUR_NAMESPACE', 10000, 0.7, false) as ScoredVector[]

And in pages/api

const context = await getContext(lastUserMessage.content, 'KPFellows4', 10000, 0.7, false) as ScoredVector[];
const context = await getContext(lastUserMessage.content, 'YOUR_NAMESPACE', 10000, 0.7, false) as ScoredVector[];

4. Run App

yarn dev

5. Use chatbot

Begin chatting.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages