supabase-community / nextjs-openai-doc-search

Template for building your own custom ChatGPT style doc search powered by Next.js, OpenAI, and Supabase.
https://supabase.com/blog/chatgpt-supabase-docs
Apache License 2.0
1.58k stars 280 forks source link

Sorry, I don't know how to help with that. #26

Closed d3287t328 closed 1 year ago

d3287t328 commented 1 year ago

Bug report

Describe the bug

Followed setup instructions and the only responses I get are "Sorry, I don't know how to help with that."

Additional context

There are no additional error messages in the console.

image

d3287t328 commented 1 year ago

I solved my issue with a few changes:

Manually installed pnpm manually: curl -fsSL https://get.pnpm.io/install.sh | sh - in my opinion this is an annoying dependency and would be simpler to not use, any idea why it is used?

No storage option exists to persist the session, which may result in unexpected behavior when using auth.
        If you want to set persistSession to true, please provide a storage option or you may set persistSession to false to disable this warning.
Failed to generate completion: {"error":{"message":"The server had an error while processing your request. Sorry about that!","type":"server_error","param":null,"code":null}}

To solve this warning message I had to create a new file in components:

import { createClient } from '@supabase/supabase-js'

const supabaseUrl = 'snip'
const supabaseKey = 'snip'

const supabase = createClient(supabaseUrl, supabaseKey, {
  persistSession: true,         // add persistSession here
  localStorage: window.localStorage,   // storage option 
})

There are a couple of issues with output still. My source is in standard markdown files and the markdown does not get stripped out properly per this image. Also there is no scroll up option in the chat window making earlier generated content unreadable. It also seems to sometimes produce more output then needed.

thorwebdev commented 1 year ago

This example doesn't use any auth, therefore persistSession needs to be set to false.