Skip to content

himself65/practical-star

 
 

Repository files navigation

This is a LlamaIndex project using Next.js bootstrapped with create-llama.

Getting Started

First, populate .env with OPENAI_API_KEY

install the dependencies:

npm install

[[!Delete any documents that exist within the "cache" directory that were created during prior generate executions!]]

Second, generate the embeddings of the documents in the ./data directory:

npm run generate

EXPECTED RESULT:

  • generated cache/doc_store.json
  • generated cache/index_store.json
  • generated cache/vector_store.json

ACTUAL RESULT:

  • Error generating text embeddings: adRequestError: 400 This model's maximum context length is 8192 tokens, however you requested 29265 tokens (29265 in your prompt; 0 for the completion). Please reduce your prompt; or completion length. at Function.generate (/workspaces/workspace/node_modules/.pnpm/[email protected]/node_modules/openai/src/error.ts:70:14) at OpenAI.makeStatusError (/workspaces/workspace/node_modules/.pnpm/[email protected]/node_modules/openai/src/core.ts:383:21) at OpenAI.makeRequest (/workspaces/workspace/node_modules/.pnpm/[email protected]/node_modules/openai/src/core.ts:446:24) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async OpenAIEmbedding.getOpenAIEmbedding (/workspaces/workspace/node_modules/.pnpm/llamaindex@0.3.10_@notionhq[email protected][email protected]/node_modules/llamaindex/dist/cjs/embeddings/OpenAIEmbedding.js:100:26) at async OpenAIEmbedding.getTextEmbeddings (/workspaces/workspace/node_modules/.pnpm/llamaindex@0.3.10_@notionhq[email protected][email protected]/node_modules/llamaindex/dist/cjs/embeddings/OpenAIEmbedding.js:111:16) at async batchEmbeddings (/workspaces/workspace/node_modules/.pnpm/llamaindex@0.3.10_@notionhq[email protected][email protected]/node_modules/llamaindex/dist/cjs/embeddings/types.js:61:32) at async OpenAIEmbedding.getTextEmbeddingsBatch (/workspaces/workspace/node_modules/.pnpm/llamaindex@0.3.10_@notionhq[email protected][email protected]/node_modules/llamaindex/dist/cjs/embeddings/types.js:43:16)

You can start editing the page by modifying app/generate.ts. The page auto-updates as you edit the file.

Releases

No releases published

Packages

 
 
 

Languages

  • TypeScript 94.0%
  • CSS 4.5%
  • JavaScript 1.5%