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.69k stars 746 forks source link

Open source embeddings #49

Closed manas95826 closed 6 months ago

manas95826 commented 6 months ago

Anyhow, I've to use openai embeddings for this. Can anyone provide any lead to use open source embeddings instead to make it completely open source.

developersdigest commented 6 months ago

You can use open source embeddings via Ollama embeddings: https://ollama.com/blog/embedding-models. Just update the config.tsx with the models you'd like to use

manas95826 commented 6 months ago

Thanks a lot for this. Why is it demanding openai api key now then? @developersdigest

developersdigest commented 6 months ago

Should have mentioned - Ollama required an apiKey even though it isn't used. Try adding: 'ollama' as the api key.

More info: https://ollama.com/blog/openai-compatibility