joschan21 / quill

Quill - A Modern SaaS-Platform Built With Next.js 13
1.86k stars 490 forks source link

Too many pages in PDF Your Free plan supports up to 5 pages per PDF #2

Open masapasa opened 11 months ago

masapasa commented 11 months ago

I just uploaded one pdf file with one page. Can you please help me. Thanks a lot!

johanguse commented 11 months ago

Did you change the Pinecone region? Maybe 'us-east1-gcp' is different to you... take a look at Pinecone account

Pinecone Client Instantiation - src/lib/pinecone.ts

import { PineconeClient } from '@pinecone-database/pinecone'

export const getPineconeClient = async () => {
  const client = new PineconeClient()

  await client.init({
    apiKey: process.env.PINECONE_API_KEY!,
    environment: 'us-east1-gcp',
  })

  return client
}
Kumar-Sahani commented 11 months ago

Here's how I fixed this issue:

Go to your pinecone project (https://app.pinecone.io/) Delete the api key, Delete the index, Delete the organisation

And now you have to create a new project then a new index(copy and save the environment value) and finally generate an api key

in your project go to src/lib/pinecone.ts and paste the environment value

also check if your openAI key hasn't expired, if expired generate a new key with another account

Save and run

akshat-OwO commented 11 months ago

just add '-free' in the environment string it fixed for me. I am using non deprecated code as well.

import { Pinecone } from '@pinecone-database/pinecone';

export const pinecone = new Pinecone({
    apiKey: process.env.PINECONE_API_KEY!,
    environment: 'asia-southeast1-gcp-free',
});
Jay21105545 commented 11 months ago

My error is still not going and pinecone is showing me environment "gcp-starter" and it's still throwing me this error âš  ./src/app/api/uploadthing/core.ts Attempted import error: 'getPineconeClient' is not exported from '@/lib/pinecone' (imported as 'getPineconeClient'). @akshat-OwO and also do i need gpt-4 upgrade in my open ai account ?

akshat-OwO commented 11 months ago

@Jay21105545 you are using old deprecated syntax which josh used in the video. Don't use it simply use the code which i provided above in pinecone.ts

and in core.ts or anywhere you use

import { getPineconeClient } from '@/lib/pinecone'

replace it with

import { pinecone } from '@/lib/pinecone';

also no need to write

const pinecone = await getPineconeClient()

for model i am using gpt-3.5-turbo-16k

anand-mukul commented 11 months ago

path: \src\lib\pinecone.ts

import { PineconeClient } from '@pinecone-database/pinecone'

  export const getPineconeClient = async () => {
    const client = new PineconeClient()

    await client.init({
      apiKey: process.env.PINECONE_API_KEY!,
      environment: 'asia-southeast1-gcp-free', // Verify your environment from pinecone website 
    })

    return client
  }

Check your pinecone website for environment

Verify with path : \src\app\api\message\route.ts AND \src\app\api\uploadthing\core.ts

// 1: vectorize message
  const embeddings = new OpenAIEmbeddings({
    openAIApiKey: process.env.OPENAI_API_KEY,
  })

  const pinecone = await getPineconeClient()  //Check this line in route.ts and core.ts
  const pineconeIndex = pinecone.Index('YourIndexName')

  const vectorStore = await PineconeStore.fromExistingIndex(
    embeddings,
    {
       //@ts-ignore
      pineconeIndex,
      namespace: file.id,
    }
  )

BONUS: Make sure that your Stripe Webhook and API are in test mode and add it to .env

anand-mukul commented 11 months ago

My error is still not going and pinecone is showing me environment "gcp-starter" and it's still throwing me this error âš  ./src/app/api/uploadthing/core.ts Attempted import error: 'getPineconeClient' is not exported from '@/lib/pinecone' (imported as 'getPineconeClient'). @akshat-OwO and also do i need gpt-4 upgrade in my open ai account ?

Follow this step on Pinecone:

  1. Delete your Index,
  2. Delete Your Organization and,
  3. Create new Organization and Index .

And, You're all Good! 👋

Jay21105545 commented 11 months ago

Hello @anand-mukul @akshat-OwO still im getting error here is my both file core.ts and route.ts CORE.TS corets ROUTE.TS routets

anand-mukul commented 11 months ago

@Jay21105545 Here is update for you:

Change Index and environment name: https://gist.github.com/anand-mukul/1a813bd686f7faff2e1793b6580fa539

On Sat, Oct 7, 2023 at 9:50 PM jaybarot @.***> wrote:

Hello @anand-mukul https://github.com/anand-mukul @akshat-OwO https://github.com/akshat-OwO still im getting error here is my both file core.ts and route.ts [image: corets] https://user-images.githubusercontent.com/104069996/273397176-bbcf254e-d310-4ba0-a8e4-774d87c76390.png [image: routets] https://user-images.githubusercontent.com/104069996/273397186-b8c8e1e2-f98b-4f5d-9d49-707d7f39c4ba.png

— Reply to this email directly, view it on GitHub https://github.com/joschan21/quill/issues/2#issuecomment-1751749573, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDBUPXHKLHL6XLGOR7E7YODX6F6MDAVCNFSM6AAAAAA5NRBUBKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJRG42DSNJXGM . You are receiving this because you were mentioned.Message ID: @.***>

Jay21105545 commented 11 months ago

Brother This is the error im facing @anand-mukul

Screenshot 2023-10-11 at 1 14 28 AM
anand-mukul commented 11 months ago

@Jay21105545 import { pinecone } from '@/lib/pinecone'

 const vectorStore = await PineconeStore.fromExistingIndex(embeddings, {
    //@ts-ignore
    pineconeIndex,
    namespace: file.id,
  });
Jay21105545 commented 11 months ago

brother @anand-mukul it's now i think stuck on "Processing PDF..." first it's showing me "Processing PDF..." then it's showing me after loading Too many pages in PDF error again do you have your repo ? can you share it with me ? image

anand-mukul commented 11 months ago

@Jay21105545 Okay, Check this out https://github.com/anand-mukul/PDFNinja

Jay21105545 commented 11 months ago

@anand-mukul hello brother I'm still getting same error i have clone'd your repo and this is my repo can you pls check the error "https://github.com/Jay21105545/pdfff.git" and this my dashboard of pinecone image

anand-mukul commented 11 months ago

@Jay21105545 First, Fix this in src/lib/utils.ts for deployed version Line : 9

export function absoluteUrl(path: string) {
  return `https://pdfff.vercel.app/${path}`
}

And, Please change Index name in route.ts and core.ts with your own

Jay21105545 commented 11 months ago

i have fixed it brother pls check it now @anand-mukul but still the "Too many pages in PDF" is showing and checkout button is also not working :( sorry brother i was also changing according to your instruction i forgoted to reply it :(

anand-mukul commented 11 months ago

My error is still not going and pinecone is showing me environment "gcp-starter" and it's still throwing me this error âš  ./src/app/api/uploadthing/core.ts Attempted import error: 'getPineconeClient' is not exported from '@/lib/pinecone' (imported as 'getPineconeClient'). @akshat-OwO and also do i need gpt-4 upgrade in my open ai account ?

Follow this step on Pinecone:

  1. Delete your Index,
  2. Delete Your Organization and,
  3. Create new Organization and Index .

And, You're all Good! 👋

@Jay21105545 Try this And Follow the video for Stripe setup.

Jay21105545 commented 11 months ago

thank's brother @anand-mukul the error of page is solved but now when i ask question my message is getting delivered but there is no response from open ai ?

atilla-the-hun commented 11 months ago

I can feel your frustration bud. I'm going to help you out because I had exactly the same issue until I remembered that some projects for some unknown reason only work once deployed to Vercel and not on your localhost. All you have to do is use Josh's original repo. It works fine. Just remember to change the pinecone environment and index name in the files before deployment to your own repo. Follow his deployment instructions from deployment preview bookmarked on his Youtube tutorial to deploy to Vercel. You will keep getting all these errors on localhost. Vercel is more advanced with their production build. The technology Vercel is using is very good. Give it a go and I'm sure everything will work, but remember to follow Josh's deployment instructions to the T.

anand-mukul commented 11 months ago

@atilla-the-hun I have checked your deployed version and it's not working. Even that doesn't have access to uploaded PDF. Please review your code.

atilla-the-hun commented 11 months ago

@anand-makul Strange it's not working for you. Just logged in and checked from 2 different devices. Everything is working A-okay. Accessed from a laptop (Windows) and a mobile (Android). No problems. Everything is working 100%. I'll test from a friend's device who lives in a different suburb and see if he has any problem with it.

atilla-the-hun commented 11 months ago

quill

Proof it's working

atilla-the-hun commented 11 months ago

Tested from another mobile device. Here's what I found: The uploading section where you drop a file or click to upload a file, duplicates itself and places another upload area overlapping the previous 1. Try selecting the same file twice i.e. that is by selecting a file and uploading it once with the first file upload and then the other. Don't close the other upload dialog or prompt. It seems like there's a duplicate in this part in the codebase and the focus remains on the first upload dialog/prompt that is opened. If you select with the first prompt and close the second, it won't upload. Still works, it's just that the duplication in the code has to be fixed.

rishav887 commented 11 months ago

my messages are populating partially and then getting deleted when on vercel. Any one facing this ?

GodwinAdu commented 10 months ago

Hello please help, the fetch in the try block don't, at core.ts, here are the error im getting Error in the try block: TypeError: fetch failed at Object.fetch (node:internal/deps/undici/undici:11522:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { cause: ConnectTimeoutError: Connect Timeout Error at onConnectTimeout (node:internal/deps/undici/undici:8472:28) at node:internal/deps/undici/undici:8430:50 at Immediate._onImmediate (node:internal/deps/undici/undici:8459:37) at process.processImmediate (node:internal/timers:478:21) at process.callbackTrampoline (node:internal/async_hooks:130:17) { code: 'UND_ERR_CONNECT_TIMEOUT' } } the error is from the @/app/uploadthing/core.ts the fetch in the try block dont work and i dont know what to do again. i hope you can help me that please thank you

Sahil-pvt commented 10 months ago

Guys just see this please.... https://github.com/joschan21/quill/issues/38#issue-1979456973

Suksham-sharma commented 9 months ago
image image image image

, I did everything as mentioned , can someone help me out @akshat-OwO @anand-mukul

Sahil-pvt commented 9 months ago

image image image image , I did everything as mentioned , can someone help me out @akshat-OwO @anand-mukul

Remove namespace (Refer: https://github.com/Sahil-pvt/PDFAskMate/blob/master/src/app/api/uploadthing/core.ts)

JasonMKY commented 9 months ago

Tested from another mobile device. Here's what I found: The uploading section where you drop a file or click to upload a file, duplicates itself and places another upload area overlapping the previous 1. Try selecting the same file twice i.e. that is by selecting a file and uploading it once with the first file upload and then the other. Don't close the other upload dialog or prompt. It seems like there's a duplicate in this part in the codebase and the focus remains on the first upload dialog/prompt that is opened. If you select with the first prompt and close the second, it won't upload. Still works, it's just that the duplication in the code has to be fixed.

Yeah I'm getting this issue also...

gunjeetbawa10 commented 9 months ago

I am getting same error. please help me out like i tried removing namespace too @Sahil-pvt , Help me out

gunjeetbawa10 commented 9 months ago
Screenshot 2023-11-22 at 5 09 04 PM

What location should i enter ?

Teegreat commented 9 months ago

No fix yet? @joschan21 please kindly help us out.

Omsoni06 commented 7 months ago

bro I am frustated with this error 😭😭

finally error solved

Sujan1714 commented 5 months ago

bro I am frustated with this error 😭😭

finally error solved

Bro how

baghelkunalpal commented 4 months ago

where i fine the pinecone environment image ![Uploading image.png…]() deprecation error like

baghelkunalpal commented 4 months ago

where i fine the pinecone environment image image deprecation error like

baghelkunalpal commented 4 months ago

@anand-mukul can you help me resolve some errors my application one of the major stripe and also im not able to chat with our pdf im not able to write also in strip there is an probelm image

anand-mukul commented 4 months ago

Hi @baghelkunalpal,

Thanks for reaching out! It seems like there have been significant updates since this project was initiated, including changes in versions, policies, and codes. To resolve the issue with your Stripe account, I recommend adjusting your business location in the Stripe settings. As for the code, you can refer to the following link for guidance: PDFNinja.

Feel free to let me know if you need further assistance!

Good Luck

baghelkunalpal commented 4 months ago

Bro by the way there is also a issue I'm not able chat with pdf too many pages are that page show if I uploaded the resume also then give me the same error I'm using new gmail to create a openai key I have 5 credit also . Can pinecone can have the resion and my pinecone noe provide the environment

On Mon, 15 Apr 2024, 8:40 am Mukul Anand, @.***> wrote:

Hi @baghelkunalpal https://github.com/baghelkunalpal,

Thanks for reaching out! It seems like there have been significant updates since this project was initiated, including changes in versions, policies, and codes. To resolve the issue with your Stripe account, I recommend adjusting your business location in the Stripe settings. As for the code, you can refer to the following link for guidance: PDFNinja https://github.com/anand-mukul/PDFNinja.

Feel free to let me know if you need further assistance!

Good Luck

— Reply to this email directly, view it on GitHub https://github.com/joschan21/quill/issues/2#issuecomment-2054629702, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6HQVTB3JMEYVB7FXDWYESTY5NALHAVCNFSM6AAAAAA5NRBUBKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJUGYZDSNZQGI . You are receiving this because you were mentioned.Message ID: @.***>

Sujan1714 commented 4 months ago

Broo iam also facing same issue