mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-20 05:43:55 +00:00
docs: fix docstring examples (#16889)
This commit is contained in:
parent
c2d09fb151
commit
7d03d8f586
@ -34,16 +34,16 @@ def create_csv_agent(
|
||||
Example:
|
||||
.. code-block:: python
|
||||
|
||||
from langchain_openai import ChatOpenAI
|
||||
from langchain_experimental.agents import create_csv_agent
|
||||
from langchain_openai import ChatOpenAI
|
||||
from langchain_experimental.agents import create_csv_agent
|
||||
|
||||
llm = ChatOpenAI(model="gpt-3.5-turbo", temperature=0)
|
||||
agent_executor = create_pandas_dataframe_agent(
|
||||
llm,
|
||||
"titanic.csv",
|
||||
agent_type="openai-tools",
|
||||
verbose=True
|
||||
)
|
||||
llm = ChatOpenAI(model="gpt-3.5-turbo", temperature=0)
|
||||
agent_executor = create_pandas_dataframe_agent(
|
||||
llm,
|
||||
"titanic.csv",
|
||||
agent_type="openai-tools",
|
||||
verbose=True
|
||||
)
|
||||
""" # noqa: E501
|
||||
try:
|
||||
import pandas as pd
|
||||
|
@ -200,21 +200,20 @@ def create_pandas_dataframe_agent(
|
||||
a PythonAstREPLTool with the DataFrame(s) and any user-provided extra_tools.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from langchain_openai import ChatOpenAI
|
||||
from langchain_experimental.agents import create_pandas_dataframe_agent
|
||||
import pandas as pd
|
||||
from langchain_openai import ChatOpenAI
|
||||
from langchain_experimental.agents import create_pandas_dataframe_agent
|
||||
import pandas as pd
|
||||
|
||||
df = pd.read_csv("titanic.csv")
|
||||
llm = ChatOpenAI(model="gpt-3.5-turbo", temperature=0)
|
||||
agent_executor = create_pandas_dataframe_agent(
|
||||
llm,
|
||||
df,
|
||||
agent_type="openai-tools",
|
||||
verbose=True
|
||||
)
|
||||
df = pd.read_csv("titanic.csv")
|
||||
llm = ChatOpenAI(model="gpt-3.5-turbo", temperature=0)
|
||||
agent_executor = create_pandas_dataframe_agent(
|
||||
llm,
|
||||
df,
|
||||
agent_type="openai-tools",
|
||||
verbose=True
|
||||
)
|
||||
|
||||
""" # noqa: E501
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user