Skip to content

Commit 337a1f1

Browse files
committed
LangChain: Implement suggestions by CodeRabbit
1 parent 1acb06a commit 337a1f1

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

docs/integrate/langchain/tutorial.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
## Introduction
55

6-
**LangChain** is a framework for developing applications powered by language models. For this tutorial, we are going to use it to interact with CrateDB using only natural language without writing any SQL. To achieve that, you will need a CrateDB instance running, an OpenAI API key, and some Python knowledge.
6+
**LangChain** is a framework for developing applications powered by language models.
7+
This tutorial uses LangChain to interact with CrateDB using only natural language without writing any SQL.
8+
To achieve that, you will need a CrateDB instance running, an OpenAI API key, and some Python knowledge.
79

810
## Set up database
911

@@ -35,7 +37,11 @@ First, install the required libraries
3537
pip install 'langchain[openai]' 'sqlalchemy-cratedb'
3638
```
3739

38-
Once installed, import every component that will be used as follows. Also, before running the code snippet below, make sure to replace the <API_KEY> with your OpenAI API key. Besides that, replace the URI with the correct connection string to your CrateDB instance. Finally, enter your question as a string replacing <TEXT_QUESTION> in the code.
40+
Once installed, import the required components:
41+
Also, before running the code snippet below, make sure to replace the
42+
`<API_KEY>` with your OpenAI API key. Besides that, replace the URI with
43+
the correct connection string to your CrateDB instance. Finally, enter
44+
your question as a string replacing `<TEXT_QUESTION>` in the code.
3945

4046
```python
4147
from langchain.agents import create_sql_agent
@@ -70,7 +76,8 @@ Now that everything is set up, feel free to explore with different questions and
7076

7177
## Summary
7278

73-
This tutorial covered the use of LangChain to interact with CrateDB by simply writing questions in English. If you explore different questions, you may encounter some wrong answers, so we recommend you use this tool with caution and always check the reasoning it provides behind every answer. If you are looking for more exciting integrations, have a look at the {ref}`integrations section <integrate>` in our documentation.
79+
This tutorial demonstrates how to use LangChain to interact with CrateDB by writing questions in English.
80+
If you explore different questions, you may encounter some wrong answers, so we recommend you use this tool with caution and always check the reasoning it provides behind every answer. If you are looking for more exciting integrations, have a look at the {ref}`integrations section <integrate>` in our documentation.
7481

7582

7683
[LangChain Introduction]: https://python.langchain.com/docs/introduction/

0 commit comments

Comments
 (0)