Comments (15)
Hey @kiran-brahma - agreed we should update this with the newer chat-based models. In the mean time, you can see how we have done this on the official Supabase website here:
from nextjs-openai-doc-search.
Really would love this template to be upgraded to gpt-3.5-turbo model!! That would be super cool.
from nextjs-openai-doc-search.
Thanks @gregnr. Will see and try to understand if same can be done for my code base. Any expected timelines for a similar implementation for the current template.
from nextjs-openai-doc-search.
Hello @gregnr I tried to replicate the code shared by you but I keep getting the error
Type error: Cannot find module 'import { serve } from 'https://deno.land/[email protected]/http/server.ts'' or its corresponding type declarations.
1 | import { serve } from 'https://deno.land/[email protected]/http/server.ts'';
| ^
2 | import '[email protected]/mod.ts'
3 | import { createClient } from '@supabase/supabase-js'
4 | import { codeBlock, oneLine } from 'common-tags'
ELIFECYCLE Command failed with exit code 1.
Any idea on how to resolve as I managed to install local packages for others but unable for Deno
from nextjs-openai-doc-search.
Hey @kiran-brahma, confirming your error was copied over correctly? I see a double import:
1 | import { serve } from 'import { serve } from 'https://deno.land/[email protected]/http/server.ts'';
from nextjs-openai-doc-search.
There was an error in the code I pasted. There is no double import and just a single one
from nextjs-openai-doc-search.
Is the error coming from your IDE or when you run the edge function? If IDE & VSCode, confirming you have the official Deno extension installed and the dependency has been cached?
from nextjs-openai-doc-search.
I am getting the error when deploying it on vercel.
Including the error message I got after making another attempt today
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry
- info Linting and checking validity of types...
Failed to compile.
./pages/api/vector-search.ts:1:23
Type error: Cannot find module 'https://deno.land/[email protected]/http/server.ts' or its corresponding type declarations.
1 | import { serve } from "https://deno.land/[email protected]/http/server.ts";
| ^
2 | import 'x/[email protected]/mod.ts'
3 | import { createClient } from '@supabase/supabase-js'
4 | import { codeBlock, oneLine } from 'common-tags'
ELIFECYCLE Command failed with exit code 1.
Error: Command "pnpm run build" exited with 1
Deployment completed
BUILD_UTILS_SPAWN_1: Command "pnpm run build" exited with 1
from nextjs-openai-doc-search.
Based on the path ./pages/api/vector-search.ts
, it looks like you are placing your edge function in a Next.js serverless function instead of a Supabase edge function. If you are planning to use Supabase edge functions, you will need to place your edge function under the ./supabase/functions
folder as described in this guide:
https://supabase.com/docs/guides/functions/quickstart
Supabase uses Deno for its edge runtime while Next.js uses Node.js (or their custom runtime for edge). This is most likely why you are getting the import error as imports work slightly different in Deno.
from nextjs-openai-doc-search.
I shifted the edge functions to supabase and when I am trying to deploy the same on supabase I am getting the following error
Version 1.30.3 is already installed
Bundling ai-docs
Error: Error bundling function: exit status 1
file:///src/import_map.json
file:///src/index.ts
file:///common/errors
file:///common/tokenizer
error: Uncaught (in promise) Error: NotFound: No such file or directory (os error 2)
const ret = new Error(getStringFromWasm0(arg0, arg1));
^
at __wbg_new_8d2af00bc1e329ee (https://deno.land/x/[email protected]/eszip_wasm.generated.js:513:19)
at (https://deno.land/x/[email protected]/eszip_wasm_bg.wasm:1:1559899)
at (https://deno.land/x/[email protected]/eszip_wasm_bg.wasm:1:1398157)
at (https://deno.land/x/[email protected]/eszip_wasm_bg.wasm:1:1895031)
at __wbg_adapter_40 (https://deno.land/x/[email protected]/eszip_wasm.generated.js:229:6)
at real (https://deno.land/x/[email protected]/eszip_wasm.generated.js:213:14)
from nextjs-openai-doc-search.
@kiran-brahma can you please update your Supabase CLI version (e.g. brew upgrade supabase
) and try again?
from nextjs-openai-doc-search.
hello @thorwebdev
Same issue persists even after the update
from nextjs-openai-doc-search.
What does supabase --version output for you? Maybe there's a caching issue. Might have to run brew update first and the brew upgrade supabase.
from nextjs-openai-doc-search.
If brew
/scoop
isn't getting you the latest version, you can also try the NPM approach as described here:
https://supabase.com/docs/guides/cli
from nextjs-openai-doc-search.
See my PR #34 which is what worked for me.
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
- 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)
- Cannot generate embeddings HOT 12
- 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.