====== LangChain ======
🗂️ [[start|Terug naar start]]\\
⛓️ 🗂️ [[longchain_home|Terug naar longchain start]]
===== Links =====
[[https://python.langchain.com/docs/get_started/introduction|langChain Home]]\\
[[https://github.com/langchain-ai/langchain|LangChain op GitHub]]\\
[[https://www.youtube.com/watch?v=I4mFqyqFkxg|LangChain is AMAZING | Quick Python Tutorial]]\\
**[[https://pub.aimind.so/building-a-custom-chat-agent-for-document-qa-with-langchain-gpt-3-5-and-pinecone-e3ae7f74e5e8|Building a Custom Chat Agent for Document QA with Langchain, GPT-3.5 and Pinecone]]** ✨
[[https://www.youtube.com/watch?v=x0AnCE9SE4A|YouTube: LangChain GEN AI Tutorial – 6 End-to-End Projects using OpenAI, Google Gemini Pro, LLAMA2 (4uur)]]
**[[https://nanonets.com/blog/langchain/|A Complete LangChain Guide]]** geweldige bron van informatie! ✨\\
**[[https://www.pinecone.io/learn/series/langchain/|LangChain AI Handbook (pinecone)]]** ✨\\
[[https://www.kdnuggets.com/how-to-make-large-language-models-play-nice-with-your-software-using-langchain|How to Make Large Language Models Play Nice with Your Software Using LangChain]]\\
-> **VIDEO:**\\
**[[https://www.youtube.com/playlist?list=PLIUOU7oqGTLieV9uTIFMm6_4PXg-hlN6F|Playlist LangChain!]]**\\
[[https://www.youtube.com/watch?v=15TDwVSpwKc&list=PLIUOU7oqGTLjpy44hZWE62K3RG4RTvuWt|OpenAI GPT 3.5 AI assistant with Langchain + Pinecone #1]]\\
[[https://www.youtube.com/watch?v=a89vqgK-Qcs|LangChain 🦜️ - COMPLETE TUTORIAL - Basics to advanced concept!]]\\
**[[https://www.youtube.com/watch?v=6UFtRwWnHws|Building a LangChain Custom Medical Agent with Memory met DuckDuckGo]]**
-> **[[https://python.langchain.com/docs/integrations/tools|Alle Tools om te gebruiken in Agent]]**\\
-- -> **[[https://python.langchain.com/docs/integrations/tools/ddg|DuckDuckGo Search]]**
-> **[[https://python.langchain.com/docs/integrations/chat/openai|ChatOpenAI -> LangChain Ook met eigen finetune Model]]**
==== Langsmit ====
-> [[https://www.langchain.com/langsmith|LangSmit home]]\\
-> **[[https://smith.langchain.com/o/b86f3383-ade2-50b1-9977-55be3f020f63/|LangSmit werkomgeving]]**✨\\
-> [[https://www.youtube.com/watch?v=jx7xuHlfsEQ&t=221s|Langsmit video]]\\
-> **[[https://www.youtube.com/watch?v=bE9sf9vGsrM|Getting started with LangSmith - Integrating with LANGCHAIN powered Web Applications & Chatbots]]**\\
-> **[[#langsmith_traces_aanzetten|Langsmith gebruiken in applicatie]]**
==== Semantic Router ====
**[[agents|Semantic Router]]** ✨
----
LangChain: Een Brug Tussen Python en Grote Taalmodellen
----
**Installeer basis:**
python -m pip install langchain
**Direct upgraden:** //anders werkt het niet!//
pip install --upgrade langchain
Om alle models te kunnen gebruiken //(niet echt nodig)//:
pip install langchain[all]
[[https://python.langchain.com/docs/get_started/installation|LongChain Installeren]]
:!: **Bij problemen met gewoon installeren de onderstaande methode gebruiken**
python -m pip install langchain[all]
----
====== LangChain v0.1.0 ======
[[https://blog.langchain.dev/langchain-v0-1-0/|LangChain v0.1.0 - DEV BOG]]\\
[[https://python.langchain.com/docs/get_started/introduction|Documents]]\\
[[https://python.langchain.com/docs/integrations/providers|Intergraties]]
[[https://www.youtube.com/watch?v=FbUhHUeI3ZU|YouTube: LangChain Version 0.1.0 Explained | New Features & Changes]]\\
[[https://www.youtube.com/playlist?list=PLfaIDFEXuae0gBSJ9T0w7cu7iJZbH3T31|YouTube playList]]
pip install langchain==0.1.0
===== Pinecone en Langchain v0.1.0 =====
[[https://www.reddit.com/r/LangChain/comments/199mklo/langchain_011_is_not_working_with_pineconeclient/?rdt=45329|Langchain 0.1.1 is not working with pinecone-client 3.0.0]]\\
**[[https://python.langchain.com/docs/modules/data_connection/retrievers/|Retrievers]]**
**LangSmith:**\\
**[[https://smith.langchain.com/o/b86f3383-ade2-50b1-9977-55be3f020f63|Welcome to LangSmith (agents,prompts en meer via hub)]]**
**Tools:**\\
**[[https://app.tavily.com/home|Tavily AI zoek API voor langchain ed]]**
----
===== Langsmith traces aanzetten =====
from langchain_core.tracers.context import tracing_v2_enabled
os.environ["LANGCHAIN_TRACING_V2"] = "true"
os.environ["LANGCHAIN_PROJECT"] = f"cat-viseur-01"
os.environ["LANGCHAIN_ENDPOINT"] = "https://api.smith.langchain.com"
os.environ["LANGCHAIN_API_KEY"] = st.secrets["LANGCHAIN_API_KEY"]
----
===== Langchain v0.2 =====
[[https://python.langchain.com/v0.2/docs/versions/v0_2/|Langchain v0.2 nieuwe documentatie]]