Skip to content

Commit

Permalink
docs(create_sql_agent): fix reStructured Text Markup (#28356)
Browse files Browse the repository at this point in the history
- **Description:** Lines of code must be indented beneath `..
code-block::` for proper formatting.
https://devguide.python.org/documentation/markup/#showing-code-examples
- **Issue:** The example code block on the `create_sql_agent` document
page is not properly rendered.

https://python.langchain.com/api_reference/community/agent_toolkits/langchain_community.agent_toolkits.sql.base.create_sql_agent.html#langchain_community.agent_toolkits.sql.base.create_sql_agent

<img width="933" alt="image"
src="https://github.com/user-attachments/assets/d764bcad-e412-408b-ab0b-9a78a11188ee">
  • Loading branch information
0xRichardH authored Nov 26, 2024
1 parent 195ae7b commit c161f7d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libs/community/langchain_community/agent_toolkits/sql/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ def create_sql_agent(
.. code-block:: python
from langchain_openai import ChatOpenAI
from langchain_community.agent_toolkits import create_sql_agent
from langchain_community.utilities import SQLDatabase
from langchain_openai import ChatOpenAI
from langchain_community.agent_toolkits import create_sql_agent
from langchain_community.utilities import SQLDatabase
db = SQLDatabase.from_uri("sqlite:///Chinook.db")
llm = ChatOpenAI(model="gpt-3.5-turbo", temperature=0)
agent_executor = create_sql_agent(llm, db=db, agent_type="tool-calling", verbose=True)
db = SQLDatabase.from_uri("sqlite:///Chinook.db")
llm = ChatOpenAI(model="gpt-3.5-turbo", temperature=0)
agent_executor = create_sql_agent(llm, db=db, agent_type="tool-calling", verbose=True)
""" # noqa: E501
from langchain.agents import (
Expand Down

0 comments on commit c161f7d

Please sign in to comment.