khoj-ai / khoj

Your AI second brain. Self-hostable. Get answers from the web or your docs. Build custom agents, schedule automations, do deep research. Turn any online or local LLM into your personal, autonomous AI (e.g gpt, claude, gemini, llama, qwen, mistral).
https://khoj.dev
GNU Affero General Public License v3.0
14.1k stars 702 forks source link

Integrate Langchain processor to include models from all model providers #811

Closed ishan00 closed 1 month ago

ishan00 commented 5 months ago

For Anthropic and OpenAI there are separate classes of functions that use the 3P APIs individually. Using langchain will open up to loads of models with replicable code.

Wondering why this isn't available already?

Happy to contribute

sabaimran commented 5 months ago

Hey @ishan00 ! Our anthropic and openai integrations use the first party libraries. Generalizing to multiple providers is enabled via openai-api compatible proxies like litellm. We're not using langchain because it usually becomes quite constraining if you're using it beyond the basic usage. Thanks for the offer to contribute! But this doesn't need change atm.