developersdigest / llm-answer-engine

Build a Perplexity-Inspired Answer Engine Using Next.js, Groq, Llama-3, Langchain, OpenAI, Upstash, Brave & Serper
https://developersdigest.tech
MIT License
4.66k stars 742 forks source link

hey i am on windows and get this error on windows 11 #1

Closed toprak1919 closed 8 months ago

toprak1919 commented 8 months ago
  1. Received POST request
  2. Destructured request data
  3. Initializing Search Engine Process
  4. Rephrasing input
  5. Rephrased input and got answer from Groq
  6. Rephrased message and got documents from BraveSearch
  7. Fetching page content for https://smodin.io/free-english-rewriter-and-spinner
  8. Fetching page content for https://www.prepostseo.com/paraphrasing-tool
  9. Fetching page content for https://products.groupdocs.app/rewriter/text
  10. Fetching page content for https://paraphraz.it/
  11. Extracting main content from HTML for https://products.groupdocs.app/rewriter/text
  12. Extracting main content from HTML for https://smodin.io/free-english-rewriter-and-spinner
  13. Extracting main content from HTML for https://paraphraz.it/
  14. Extracting main content from HTML for https://www.prepostseo.com/paraphrasing-tool
  15. Processed 1 sources for https://products.groupdocs.app/rewriter/text file:///C:/Users/Toprak/Desktop/fetcher/llm-answer-engine/node_modules/@langchain/openai/dist/embeddings.js:203 input: this.stripNewLines ? text.replace(/\n/g, " ") : text, ^

TypeError: Cannot read properties of undefined (reading 'replace') at OpenAIEmbeddings.embedQuery (file:///C:/Users/Toprak/Desktop/fetcher/llm-answer-engine/node_modules/@langchain/openai/dist/embeddings.js:203:46) at MemoryVectorStore.similaritySearch (file:///C:/Users/Toprak/Desktop/fetcher/llm-answer-engine/node_modules/@langchain/core/dist/vectorstores.js:104:90) at fetchAndProcess (file:///C:/Users/Toprak/Desktop/fetcher/llm-answer-engine/index.js:97:30) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Promise.all (index 2) at async searchEngineForSources (file:///C:/Users/Toprak/Desktop/fetcher/llm-answer-engine/index.js:57:12) at async file:///C:/Users/Toprak/Desktop/fetcher/llm-answer-engine/index.js:100:19

Node.js v20.9.0

toprak1919 commented 8 months ago

okay i sent the request as text instead of json on postman :) solved it