mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-05 21:12:48 +00:00
docs: add csv use case (#16756)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import warnings
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, Sequence, Union
|
||||
from typing import TYPE_CHECKING, Any, Dict, Literal, Optional, Sequence, Union
|
||||
|
||||
from langchain_core.messages import AIMessage, SystemMessage
|
||||
from langchain_core.prompts import BasePromptTemplate, PromptTemplate
|
||||
@@ -40,7 +40,6 @@ def create_sql_agent(
|
||||
prefix: Optional[str] = None,
|
||||
suffix: Optional[str] = None,
|
||||
format_instructions: Optional[str] = None,
|
||||
input_variables: Optional[List[str]] = None,
|
||||
top_k: int = 10,
|
||||
max_iterations: Optional[int] = 15,
|
||||
max_execution_time: Optional[float] = None,
|
||||
@@ -70,9 +69,6 @@ def create_sql_agent(
|
||||
format_instructions: Formatting instructions to pass to
|
||||
ZeroShotAgent.create_prompt() when 'agent_type' is
|
||||
"zero-shot-react-description". Otherwise ignored.
|
||||
input_variables: DEPRECATED. Input variables to explicitly specify as part of
|
||||
ZeroShotAgent.create_prompt() when 'agent_type' is
|
||||
"zero-shot-react-description". Otherwise ignored.
|
||||
top_k: Number of rows to query for by default.
|
||||
max_iterations: Passed to AgentExecutor init.
|
||||
max_execution_time: Passed to AgentExecutor init.
|
||||
@@ -203,7 +199,10 @@ def create_sql_agent(
|
||||
)
|
||||
|
||||
else:
|
||||
raise ValueError(f"Agent type {agent_type} not supported at the moment.")
|
||||
raise ValueError(
|
||||
f"Agent type {agent_type} not supported at the moment. Must be one of "
|
||||
"'openai-tools', 'openai-functions', or 'zero-shot-react-description'."
|
||||
)
|
||||
|
||||
return AgentExecutor(
|
||||
name="SQL Agent Executor",
|
||||
|
Reference in New Issue
Block a user