mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-07 05:52:15 +00:00
Polish reference docs (#7045)
This PR fixes broken links in the reference docs.
This commit is contained in:
@@ -31,7 +31,7 @@ embeddings_model = OpenAIEmbeddings()
|
||||
#### Embed list of texts
|
||||
|
||||
```python
|
||||
embeddings = embedding_model.embed_documents(
|
||||
embeddings = embeddings_model.embed_documents(
|
||||
[
|
||||
"Hi there!",
|
||||
"Oh, hello!",
|
||||
@@ -56,7 +56,7 @@ len(embeddings), len(embeddings[0])
|
||||
Embed a single piece of text for the purpose of comparing to other embedded pieces of texts.
|
||||
|
||||
```python
|
||||
embedded_query = embedding_model.embed_query("What was the name mentioned in the conversation?")
|
||||
embedded_query = embeddings_model.embed_query("What was the name mentioned in the conversation?")
|
||||
embedded_query[:5]
|
||||
```
|
||||
|
||||
|
@@ -26,7 +26,8 @@ raw_documents = TextLoader('../../../state_of_the_union.txt').load()
|
||||
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
|
||||
documents = text_splitter.split_documents(raw_documents)
|
||||
|
||||
db = FAISS.from_documents(documents, OpenAIEmbeddings())
|
||||
embeddings = OpenAIEmbeddings()
|
||||
db = FAISS.from_documents(documents, embeddings)
|
||||
```
|
||||
|
||||
### Similarity search
|
||||
|
Reference in New Issue
Block a user