finaldie / auto-news

A personal news aggregator to pull information from multi-sources + LLM (ChatGPT/Gemini/Ollama via LangChain) to help us reading efficiently with less noises, the sources including: Tweets, RSS, YouTube, Web Articles, Reddit, and personal Journal notes.
MIT License
519 stars 56 forks source link

[Embedding] Support Ollama embedding #81

Closed finaldie closed 4 months ago

finaldie commented 4 months ago

Changes

New Env Variables

Ollama Embedding

In build/.env or build/.env.k8s, if we want to switch to Ollama embedding, change the below section

...
# The generic Text embedding provider. Supported providers:
# openai, hf, hf_inst, ollama
EMBEDDING_PROVIDER=ollama

# models:
# - openai: text-embedding-ada-002, text-embedding-3-small, ...
# - ollama: nomic-embed-text, ...
EMBEDDING_MODEL=nomic-embed-text
...

Milvus Similarity Metric Type

We can chose the one which fit for the purpose:

# L2, IP, COSINE
MILVUS_SIMILARITY_METRICS=L2