mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-06 21:43:44 +00:00
docs/fix links (#6498)
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
Install openai,google-search-results packages which are required as the langchain packages call them internally
|
||||
|
||||
>pip install openai google-search-results
|
||||
|
||||
```python
|
||||
from langchain import LLMMathChain, OpenAI, SerpAPIWrapper, SQLDatabase, SQLDatabaseChain
|
||||
from langchain.agents import initialize_agent, Tool
|
||||
|
@@ -21,5 +21,5 @@ conversation.run("And the next 4?")
|
||||
|
||||
</CodeOutputBlock>
|
||||
|
||||
Essentially, `BaseMemory` defines an interface of how `langchain` stores memory. It allows reading of stored data through `load_memory_variables` method and storing new data through `save_context` method. You can learn more about it in [Memory](../memory.html) section.
|
||||
Essentially, `BaseMemory` defines an interface of how `langchain` stores memory. It allows reading of stored data through `load_memory_variables` method and storing new data through `save_context` method. You can learn more about it in the [Memory](/docs/modules/memory/) section.
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Under the hood, LangChain uses SQLAlchemy to connect to SQL databases. The `SQLDatabaseChain` can therefore be used with any SQL dialect supported by SQLAlchemy, such as MS SQL, MySQL, MariaDB, PostgreSQL, Oracle SQL, [Databricks](../../../ecosystem/integrations/databricks.html) and SQLite. Please refer to the SQLAlchemy documentation for more information about requirements for connecting to your database. For example, a connection to MySQL requires an appropriate connector such as PyMySQL. A URI for a MySQL connection might look like: `mysql+pymysql://user:pass@some_mysql_db_address/db_name`.
|
||||
Under the hood, LangChain uses SQLAlchemy to connect to SQL databases. The `SQLDatabaseChain` can therefore be used with any SQL dialect supported by SQLAlchemy, such as MS SQL, MySQL, MariaDB, PostgreSQL, Oracle SQL, [Databricks](/docs/ecosystem/integrations/databricks.html) and SQLite. Please refer to the SQLAlchemy documentation for more information about requirements for connecting to your database. For example, a connection to MySQL requires an appropriate connector such as PyMySQL. A URI for a MySQL connection might look like: `mysql+pymysql://user:pass@some_mysql_db_address/db_name`.
|
||||
|
||||
This demonstration uses SQLite and the example Chinook database.
|
||||
To set it up, follow the instructions on https://database.guide/2-sample-databases-sqlite/, placing the `.db` file in a notebooks folder at the root of this repository.
|
||||
|
@@ -35,7 +35,7 @@ qa.run(query)
|
||||
</CodeOutputBlock>
|
||||
|
||||
## Chain Type
|
||||
You can easily specify different chain types to load and use in the RetrievalQA chain. For a more detailed walkthrough of these types, please see [this notebook](question_answering.html).
|
||||
You can easily specify different chain types to load and use in the RetrievalQA chain. For a more detailed walkthrough of these types, please see [this notebook](/docs/modules/chains/additional/question_answering.html).
|
||||
|
||||
There are two ways to load different chain types. First, you can specify the chain type argument in the `from_chain_type` method. This allows you to pass in the name of the chain type you want to use. For example, in the below we change the chain type to `map_reduce`.
|
||||
|
||||
@@ -58,7 +58,7 @@ qa.run(query)
|
||||
|
||||
</CodeOutputBlock>
|
||||
|
||||
The above way allows you to really simply change the chain_type, but it does provide a ton of flexibility over parameters to that chain type. If you want to control those parameters, you can load the chain directly (as you did in [this notebook](question_answering.html)) and then pass that directly to the the RetrievalQA chain with the `combine_documents_chain` parameter. For example:
|
||||
The above way allows you to really simply change the chain_type, but it does provide a ton of flexibility over parameters to that chain type. If you want to control those parameters, you can load the chain directly (as you did in [this notebook](/docs/modules/chains/additional/question_answering.html)) and then pass that directly to the the RetrievalQA chain with the `combine_documents_chain` parameter. For example:
|
||||
|
||||
|
||||
```python
|
||||
@@ -82,7 +82,7 @@ qa.run(query)
|
||||
</CodeOutputBlock>
|
||||
|
||||
## Custom Prompts
|
||||
You can pass in custom prompts to do question answering. These prompts are the same prompts as you can pass into the [base question answering chain](./question_answering.html)
|
||||
You can pass in custom prompts to do question answering. These prompts are the same prompts as you can pass into the [base question answering chain](/docs/modules/chains/additional/question_answering.html)
|
||||
|
||||
|
||||
```python
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Under the hood, by default this uses the [UnstructuredLoader](./unstructured_file.html)
|
||||
Under the hood, by default this uses the [UnstructuredLoader](/docs/modules/data_connection/document_loaders/integrations/unstructured_file.html)
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import DirectoryLoader
|
||||
|
@@ -24,7 +24,7 @@ Of course, we also help construct what we think useful Retrievers are. The main
|
||||
|
||||
In order to understand what a vectorstore retriever is, it's important to understand what a Vectorstore is. So let's look at that.
|
||||
|
||||
By default, LangChain uses [Chroma](../../ecosystem/chroma.md) as the vectorstore to index and search embeddings. To walk through this tutorial, we'll first need to install `chromadb`.
|
||||
By default, LangChain uses [Chroma](/docs/ecosystem/integrations/chroma.html) as the vectorstore to index and search embeddings. To walk through this tutorial, we'll first need to install `chromadb`.
|
||||
|
||||
```
|
||||
pip install chromadb
|
||||
|
Reference in New Issue
Block a user