Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.1.4 #121

Merged
merged 14 commits into from
Jan 26, 2024
Merged

1.1.4 #121

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,427 changes: 1,427 additions & 0 deletions .github/archive/agentexecutor_rag.ipynb

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@ Documents created by those much more experienced than I. This directory is meant
2. "Needle In A Haystack" Analysis: Pressure Testing GPT-4 & Claude 2.1's Long Context Retrieval Accuracy
- An exported email from Greg Kramradt's mailing list. He personally pressure tested these models with the intention of helping others make smarter decisions when it comes to retrieval.


<s>

## Custom-GPT - Uploadable Knowledge Base

A directory to hold file-base files.

Currently only contains the [Assistant Architect](https://chat.openai.com/g/g-gOeFNMJ8Z-assistant-architect-aa4llm "Daethyra's Custom LangChain Programming Asisstant")'s files which may be useful for inspiration or insight.

The files available may be turned into helpful templates, or if you're unsatisfied with how AA4LLM works, you might learn what *not* to do for your own Custom GPT.
The files available may be turned into helpful templates, or if you're unsatisfied with how AA4LLM works, you might learn what *not* to do for your own Custom GPT.

</s>
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "Build-RAGAI"
version = "1.1.33"
version = "1.1.4"
description = "Retrieval Augmented Generation code for AI. Prebuilt Python components for leveraging generative AI via Large Language Models."
authors = [
{name = "Daethyra", email = "[email protected]"},
Expand Down
542 changes: 225 additions & 317 deletions src/langchain/notebooks/agentexecutor_custom_tools.ipynb

Large diffs are not rendered by default.

2,053 changes: 0 additions & 2,053 deletions src/langchain/notebooks/agentexecutor_rag.ipynb

This file was deleted.

1,039 changes: 568 additions & 471 deletions src/langchain/notebooks/langsmith_walkthrough.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@
"source": [
"import chardet\n",
"\n",
"from langchain.chat_models import ChatOpenAI\n",
"from langchain_openai.chat_models import ChatOpenAI\n",
"from langchain.prompts import ChatPromptTemplate\n",
"from langchain_core.output_parsers import StrOutputParser\n",
"from langchain_core.runnables import RunnablePassthrough\n",
"from langchain_community.document_loaders.unstructured import UnstructuredFileLoader\n",
"from unstructured.cleaners.core import clean_extra_whitespace\n",
"\n",
"# Set API Key\n",
"os.environ['OPENAI_API_KEY'] = \"sk-\""
"os.environ['OPENAI_API_KEY'] = \"\""
]
},
{
Expand Down Expand Up @@ -299,6 +299,7 @@
"outputs": [],
"source": [
"from langchain_community.document_loaders import WebBaseLoader\n",
"\n",
"loader = WebBaseLoader(\"https://python.langchain.com/docs/expression_language/\")\n",
"\n",
"docs = loader.load()"
Expand Down
8 changes: 4 additions & 4 deletions src/langchain/notebooks/learn_rag_mongoDB.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"source": [
"import os\n",
"\n",
"os.environ[\"OPENAI_API_KEY\"] = \"sk-\""
"os.environ[\"OPENAI_API_KEY\"] = \"\""
]
},
{
Expand Down Expand Up @@ -105,8 +105,8 @@
"metadata": {},
"outputs": [],
"source": [
"from langchain.embeddings import OpenAIEmbeddings\n",
"from langchain.vectorstores import MongoDBAtlasVectorSearch\n",
"from langchain_openai.embeddings import OpenAIEmbeddings\n",
"from langchain_community.vectorstores import MongoDBAtlasVectorSearch\n",
"\n",
"# insert the documents in MongoDB Atlas with their embedding\n",
"vector_search = MongoDBAtlasVectorSearch.from_documents(\n",
Expand Down Expand Up @@ -230,7 +230,7 @@
],
"source": [
"from langchain.chains import RetrievalQA\n",
"from langchain.chat_models import ChatOpenAI\n",
"from langchain_community.chat_models import ChatOpenAI\n",
"\n",
"qa = RetrievalQA.from_chain_type(\n",
" llm=ChatOpenAI(model_name=\"gpt-3.5-turbo-1106\", temperature=0.7),\n",
Expand Down
11 changes: 9 additions & 2 deletions src/langchain/notebooks/learn_rag_pinecone_chromadb.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"id": "0d85fde0",
"metadata": {},
"source": [
"# Similarity Searching using top_k\n",
"# RAG with Pinecone and Chroma\n",
"\n",
"## Similarity Searching using top_k\n",
"\n",
"In this notebook, you will learn to load data, split it, retrieve and store embeddings in either Pinecone or ChromaDB, and perform similarity searching which is a way to ask your documents questions.\n",
"\n",
Expand Down Expand Up @@ -448,8 +450,13 @@
"source": [
"I use `ChatOpenAI` because I prefer the other classes from LangChain that go with it. You may also use an llm for the same task.\n",
"\n",
"<s>\n",
"I encourage you to specify the model name because you will save money.\n",
"- For example, \"gpt-3.5-turbo-1106\" is ***far far far*** cheaper than the base models."
"\n",
"- For example, \"gpt-3.5-turbo-1106\" is ***far far far*** cheaper than the base models.\n",
"</s>\n",
"\n",
"Base models were deprecated on January 4th, 2023."
]
},
{
Expand Down
Loading