Comments (12)
This seems to have resolved on my end after upgrading the supabase client package.
You can do so by running pnpm up @supabase/supabase-js
from nextjs-openai-doc-search.
As of 19 Sep 2023, 00:09 UTC, Vercel has identified an Increased middleware and edge function failures in pdx1 which causes the error of "Sad news, the search has failed!" to occur. This issue doesn't seem to lie with Supabase because I logged the queries and responses in a backend Supabase table, and it seems that the queries are being sent back and forth from OpenAI just fine. As of right now (04:03 UTC), my front-end is receiving the outputs from OpenAI successfully.
(Edit: nevermind, it's still a bit iffy. My request times out every now and then, even now)
I'm not entirely sure what lines 333 to 337 is doing either, but I used this quick fix in my project by replacing lines 333 to 337 with the following: .
if (!shouldRefresh && existingPage !== null && existingPage.checksum === checksum) {
const existingParentPage = existingPage.parentPage?.length === 1 ? existingPage.parentPage[0] : undefined;
I'm not sure if this is the intended fix, but it should minimally get the project up and running in the meantime.
from nextjs-openai-doc-search.
Apologies, took a break before coming back to this.
I made fixed this a bit ago by:
- swapping on
line 331
theundefined
type tounknown
. - modify the if statement on
line 340
, to assert a 'string' type on thepath
property in theexistingParentPage
object.
These changes were made on my own forked project, so I can't be sure if it would work on this one.
Perhaps someone could give it a spin? ;)
from nextjs-openai-doc-search.
got the same issue
from nextjs-openai-doc-search.
Can you double check that your local .env
file is configured with the correct keys and if yes, can you share the content of your nods_page
and nods_page_section
tables?
from nextjs-openai-doc-search.
I'm having the same issue. My keys are correct in the local env, and on the production environment Supabase and Vercel are integrated. But pnpm run embeddings fails consistently.
from nextjs-openai-doc-search.
After updating the version of Supabase, we can generate embeddings now, but now one of the TypeScript files fail to compile after updating the version of Supabase.
I would post my fix, but I'm very much not a software developer and I'm pretty sure my solution violates at least 10 good practices of software engineering, so I'll let someone else propose a fix.
from nextjs-openai-doc-search.
After updating supabase, same error as before when attempting a search. Sad news, the search has failed! Please try again.
from nextjs-openai-doc-search.
And also getting the ts compilation errors on deployment.
Failed to compile.
./lib/generate-embeddings.ts:334:36
Type error: Conversion of type '{ id: any; path: any; }[]' to type 'undefined' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
332 | // We use checksum to determine if this page & its sections need to be regenerated
333 | if (!shouldRefresh && existingPage?.checksum === checksum) {
334 | const existingParentPage = existingPage?.parentPage as Singular<
| ^
335 | typeof existingPage.parentPage
336 | >
337 |
from nextjs-openai-doc-search.
@antonioglass Did you ever find a fix? upgrading the supabase-js package and got this error
{
code: 'PGRST102',
details: null,
hint: null,
message: 'Content-Type not acceptable: application/json, text/plain'
}
from nextjs-openai-doc-search.
@antonioglass Did you ever find a fix? upgrading the supabase-js package and got this error
{ code: 'PGRST102', details: null, hint: null, message: 'Content-Type not acceptable: application/json, text/plain' }
fix this issue by upgrading supabase and node js to v20
from nextjs-openai-doc-search.
Line numbers must be mismatched on my end. If you don't mind posting this generate-embeddings.ts code, or at least a side by side of the original lines vs the corrected ones, that would be appreciated.
from nextjs-openai-doc-search.
Related Issues (20)
- Add native login capabilities HOT 1
- Chat list is not up to date / not working
- list of users do not appear in order
- Usage of gpt-3.5-turbo model HOT 15
- Add `vector-search` Vercel Edge Function
- I embedded a document that says: Hello, you are an actor. A very good actor. You can also speak Chinese. But there was no response when I asked. HOT 4
- 经常出现Sorry, I don't know how to help with that. HOT 1
- Not able to make this starter project work HOT 7
- Sorry, I don't know how to help with that. HOT 2
- Reply with images HOT 4
- Error: Cannot find module 'openai' HOT 4
- Anway to ask it what it knows? HOT 1
- Error: `Failed to match page sections: {"code":"PGRST301","details":null,"hint":null,"message":"JWSError JWSInvalidSignature"}` HOT 2
- Long replies breaks the app HOT 3
- Modify code to implement streaming (for serverless)
- Page *page-name* or one/multiple of its page sections failed to store properly. Page has been marked with null checksum to indicate that it needs to be re-generated.
- Addressing Runtime Error on Initial Project Setup HOT 1
- New user of supabase, how can I add datas and files STEP BY STEP into supabase and let them connect with my website? HOT 7
- Deployment Fails When Trying to Deploy Template From Vercel.ai Page HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nextjs-openai-doc-search.