docs: use invoke instead of run (#19457)

Updated the deprecated run with invoke

Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
This commit is contained in:
Ray Bell 2024-03-22 18:08:26 -04:00 committed by GitHub
parent d93d49bc43
commit f959fad56e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -116,7 +116,7 @@
} }
], ],
"source": [ "source": [
"agent.run(\"how many rows are there?\")" "agent.invoke(\"how many rows are there?\")"
] ]
}, },
{ {
@ -154,7 +154,7 @@
} }
], ],
"source": [ "source": [
"agent.run(\"how many people have more than 3 siblings\")" "agent.invoke(\"how many people have more than 3 siblings\")"
] ]
}, },
{ {
@ -204,7 +204,7 @@
} }
], ],
"source": [ "source": [
"agent.run(\"whats the square root of the average age?\")" "agent.invoke(\"whats the square root of the average age?\")"
] ]
}, },
{ {
@ -264,7 +264,7 @@
], ],
"source": [ "source": [
"agent = create_pandas_dataframe_agent(OpenAI(temperature=0), [df, df1], verbose=True)\n", "agent = create_pandas_dataframe_agent(OpenAI(temperature=0), [df, df1], verbose=True)\n",
"agent.run(\"how many rows in the age column are different?\")" "agent.invoke(\"how many rows in the age column are different?\")"
] ]
}, },
{ {