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

Samples: Update Langchain dependencies and fix Pydantic deprecation errors #588

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
langchain-community>=0.2.9 # For PebbloSafeLoader, PebbloRetrievalQA, VectorStore
langchain-google-community>=1.0.4 # For GoogleDriveLoader
langchain-openai>=0.1.7 # For OpenAI LLM and OpenAIEmbeddings
langchain-community>=0.3.1 # For PebbloSafeLoader, PebbloRetrievalQA, VectorStore
langchain-google-community>=2.0.0 # For GoogleDriveLoader
langchain-openai>=0.2.1 # For OpenAI LLM and OpenAIEmbeddings
python-dotenv==1.0.0
tiktoken
requests>=2.32.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
langchain-community>=0.2.9 # For PebbloSafeLoader, PebbloRetrievalQA, VectorStore
langchain-google-community>=1.0.4 # For GoogleDriveLoader
langchain-openai>=0.1.7 # For OpenAI LLM and OpenAIEmbeddings
langchain-community>=0.3.1 # For PebbloSafeLoader, PebbloRetrievalQA, VectorStore
langchain-openai>=0.2.1 # For OpenAI LLM and OpenAIEmbeddings
langchain-google-community>=2.0.0 # For GoogleDriveLoader
python-dotenv==1.0.0
requests>=2.32.0
Markdown==3.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def ask(
query=question, auth_context=auth_context, semantic_context=semantic_context
)
# Print chain input in formatted json
print(f"\nchain_input: {chain_input.json(indent=4)}")
print(f"\nchain_input: {chain_input.model_dump_json(indent=4)}")
return self.retrieval_chain.invoke(chain_input.dict())


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ unstructured[all-docs] # For Docx, PDF loading
pymupdf # For PDF loading
tiktoken # OpenAI tokenizer

langchain-openai>=0.1.7 # For OpenAI LLM and OpenAIEmbeddings
langchain-community>=0.2.9 # for PebbloSafeLoader, PebbloRetrievalQA
langchain-community>=0.3.1 # For PebbloSafeLoader, PebbloRetrievalQA, VectorStore
langchain-openai>=0.2.1 # For OpenAI LLM and OpenAIEmbeddings

o365 # Sharepoint
azure-identity # Sharepoint

psycopg2-binary # For Postgres VectorStore
langchain-postgres # For Postgres VectorStore
langchain-postgres>=0.0.12 # For Postgres VectorStore
#psycopg[binary,pool] # For Remote Postgres
pgvector # Postgres Vector Extension
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def ask(
query=question, auth_context=auth_context, semantic_context=semantic_context
)
# Print chain input in formatted json
print(f"\nchain_input: {chain_input.json(indent=4)}")
print(f"\nchain_input: {chain_input.model_dump_json(indent=4)}")
return self.retrieval_chain.invoke(chain_input.dict())


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ unstructured[all-docs] # For Docx, PDF loading
pymupdf # For PDF loading
tiktoken # OpenAI tokenizer

langchain-openai>=0.1.7 # For OpenAI LLM and OpenAIEmbeddings
langchain-community>=0.2.9 # For PebbloSafeLoader, PebbloRetrievalQA
langchain-community>=0.3.1 # For PebbloSafeLoader, PebbloRetrievalQA, VectorStore
langchain-openai>=0.2.1 # For OpenAI LLM and OpenAIEmbeddings

o365 # Sharepoint
azure-identity # Sharepoint
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
langchain-community>=0.2.9 # For PebbloSafeLoader, PebbloRetrievalQA, VectorStore
langchain-google-community>=1.0.4 # For GoogleDriveLoader
langchain-openai>=0.1.7 # For OpenAI LLM and OpenAIEmbeddings
langchain-community>=0.3.1 # For PebbloSafeLoader, PebbloRetrievalQA, VectorStore
langchain-google-community>=2.0.0 # For GoogleDriveLoader
langchain-openai>=0.2.1 # For OpenAI LLM and OpenAIEmbeddings
python-dotenv==1.0.0
requests>=2.32.0
Markdown==3.5
Expand Down