mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-13 13:36:15 +00:00
docs, templates: update schema imports to core (#17885)
- chat models, messages - documents - agentaction/finish - baseretriever,document - stroutputparser - more messages - basemessage - format_document - baseoutputparser --------- Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
@@ -63,7 +63,7 @@ You can find the documents in the `packages/self-query-qdrant/self_query_qdrant/
|
||||
Here is one of the documents:
|
||||
|
||||
```python
|
||||
from langchain.schema import Document
|
||||
from langchain_core.documents import Document
|
||||
|
||||
Document(
|
||||
page_content="Spaghetti with meatballs and tomato sauce",
|
||||
@@ -108,7 +108,7 @@ chain = create_chain(
|
||||
The same goes for the `initialize` function that creates a Qdrant collection and indexes the documents:
|
||||
|
||||
```python
|
||||
from langchain.schema import Document
|
||||
from langchain_core.documents import Document
|
||||
from langchain_community.embeddings import HuggingFaceEmbeddings
|
||||
|
||||
from self_query_qdrant.chain import initialize
|
||||
|
@@ -3,11 +3,11 @@ from typing import List, Optional
|
||||
|
||||
from langchain.chains.query_constructor.schema import AttributeInfo
|
||||
from langchain.retrievers import SelfQueryRetriever
|
||||
from langchain.schema import Document, StrOutputParser
|
||||
from langchain_community.embeddings import OpenAIEmbeddings
|
||||
from langchain_community.llms import BaseLLM
|
||||
from langchain_community.llms.openai import OpenAI
|
||||
from langchain_community.vectorstores.qdrant import Qdrant
|
||||
from langchain_core.documents import Document, StrOutputParser
|
||||
from langchain_core.embeddings import Embeddings
|
||||
from langchain_core.pydantic_v1 import BaseModel
|
||||
from langchain_core.runnables import RunnableParallel, RunnablePassthrough
|
||||
|
@@ -1,5 +1,5 @@
|
||||
from langchain.chains.query_constructor.schema import AttributeInfo
|
||||
from langchain.schema import Document
|
||||
from langchain_core.documents import Document
|
||||
|
||||
# Qdrant collection name
|
||||
DEFAULT_COLLECTION_NAME = "restaurants"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
from string import Formatter
|
||||
from typing import List
|
||||
|
||||
from langchain.schema import Document
|
||||
from langchain_core.documents import Document
|
||||
|
||||
document_template = """
|
||||
PASSAGE: {page_content}
|
||||
|
Reference in New Issue
Block a user