id stringlengths 14 15 | text stringlengths 35 2.51k | source stringlengths 61 154 |
|---|---|---|
b75952407af0-0 | langchain.utilities.arxiv.ArxivAPIWrapper¶
class langchain.utilities.arxiv.ArxivAPIWrapper(*, arxiv_search: Any = None, arxiv_exceptions: Any = None, top_k_results: int = 3, load_max_docs: int = 100, load_all_available_meta: bool = False, doc_content_chars_max: Optional[int] = 4000, ARXIV_MAX_QUERY_LENGTH: int = 300)[s... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.arxiv.ArxivAPIWrapper.html |
b75952407af0-1 | param top_k_results: int = 3¶
load(query: str) → List[Document][source]¶
Run Arxiv search and get the article texts plus the article meta information.
See https://lukasschwab.me/arxiv.py/index.html#Search
Returns: a list of documents with the document.page_content in text format
run(query: str) → str[source]¶
Run Arxiv... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.arxiv.ArxivAPIWrapper.html |
d4ff1f95cf55-0 | langchain.utilities.vertexai.init_vertexai¶
langchain.utilities.vertexai.init_vertexai(project: Optional[str] = None, location: Optional[str] = None, credentials: Optional[Credentials] = None) → None[source]¶
Init vertexai.
Parameters
project – The default GCP project to use when making Vertex API calls.
location – The... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.vertexai.init_vertexai.html |
fc397df88532-0 | langchain.utilities.searx_search.SearxSearchWrapper¶
class langchain.utilities.searx_search.SearxSearchWrapper(*, searx_host: str = '', unsecure: bool = False, params: dict = None, headers: Optional[dict] = None, engines: Optional[List[str]] = [], categories: Optional[List[str]] = [], query_suffix: Optional[str] = '', ... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.searx_search.SearxSearchWrapper.html |
fc397df88532-1 | param k: int = 10¶
param params: dict [Optional]¶
param query_suffix: Optional[str] = ''¶
param searx_host: str = ''¶
param unsecure: bool = False¶
async aresults(query: str, num_results: int, engines: Optional[List[str]] = None, query_suffix: Optional[str] = '', **kwargs: Any) → List[Dict][source]¶
Asynchronously quer... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.searx_search.SearxSearchWrapper.html |
fc397df88532-2 | }
Return type
Dict with the following keys
run(query: str, engines: Optional[List[str]] = None, categories: Optional[List[str]] = None, query_suffix: Optional[str] = '', **kwargs: Any) → str[source]¶
Run query through Searx API and parse results.
You can pass any other params to the searx query API.
Parameters
query – ... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.searx_search.SearxSearchWrapper.html |
7bd51cb86842-0 | langchain.utilities.powerbi.fix_table_name¶
langchain.utilities.powerbi.fix_table_name(table: str) → str[source]¶
Add single quotes around table names that contain spaces. | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.powerbi.fix_table_name.html |
7e16424fd2f8-0 | langchain.utilities.zapier.ZapierNLAWrapper¶
class langchain.utilities.zapier.ZapierNLAWrapper(*, zapier_nla_api_key: str, zapier_nla_oauth_access_token: str, zapier_nla_api_base: str = 'https://nla.zapier.com/api/v1/')[source]¶
Bases: BaseModel
Wrapper for Zapier NLA.
Full docs here: https://nla.zapier.com/start/
This... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.zapier.ZapierNLAWrapper.html |
7e16424fd2f8-1 | The return list can be empty if no actions exposed. Else will contain
a list of action objects:
[{“id”: str,
“description”: str,
“params”: Dict[str, str]
}]
params will always contain an instructions key, the only required
param. All others optional and if provided will override any AI guesses
(see “understanding the A... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.zapier.ZapierNLAWrapper.html |
7e16424fd2f8-2 | insertting back into an LLM.
list() → List[Dict][source]¶
Returns a list of all exposed (enabled) actions associated with
current user (associated with the set api_key). Change your exposed
actions here: https://nla.zapier.com/demo/start/
The return list can be empty if no actions exposed. Else will contain
a list of a... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.zapier.ZapierNLAWrapper.html |
7e16424fd2f8-3 | The return JSON is guaranteed to be less than ~500 words (350
tokens) making it safe to inject into the prompt of another LLM
call.
run_as_str(*args, **kwargs) → str[source]¶
Same as run, but returns a stringified version of the JSON for
insertting back into an LLM.
validator validate_environment » all fields[source]... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.zapier.ZapierNLAWrapper.html |
2cb98161dc83-0 | langchain.utilities.wolfram_alpha.WolframAlphaAPIWrapper¶
class langchain.utilities.wolfram_alpha.WolframAlphaAPIWrapper(*, wolfram_client: Any = None, wolfram_alpha_appid: Optional[str] = None)[source]¶
Bases: BaseModel
Wrapper for Wolfram Alpha.
Docs for using:
Go to wolfram alpha and sign up for a developer account
... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.wolfram_alpha.WolframAlphaAPIWrapper.html |
baf3ca8a3527-0 | langchain.utilities.bing_search.BingSearchAPIWrapper¶
class langchain.utilities.bing_search.BingSearchAPIWrapper(*, bing_subscription_key: str, bing_search_url: str, k: int = 10)[source]¶
Bases: BaseModel
Wrapper for Bing Search API.
In order to set this up, follow instructions at:
https://levelup.gitconnected.com/api-... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.bing_search.BingSearchAPIWrapper.html |
dd10ba01e8dc-0 | langchain.utilities.twilio.TwilioAPIWrapper¶
class langchain.utilities.twilio.TwilioAPIWrapper(*, client: Any = None, account_sid: Optional[str] = None, auth_token: Optional[str] = None, from_number: Optional[str] = None)[source]¶
Bases: BaseModel
Messaging Client using Twilio.
To use, you should have the twilio python... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.twilio.TwilioAPIWrapper.html |
dd10ba01e8dc-1 | Twilio also work here. You cannot, for example, spoof messages from a private
cell phone number. If you are using messaging_service_sid, this parameter
must be empty.
run(body: str, to: str) → str[source]¶
Run body through Twilio and respond with message sid.
Parameters
body – The text of the message you want to send. ... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.twilio.TwilioAPIWrapper.html |
cb4a62bcbf99-0 | langchain.utilities.openapi.OpenAPISpec¶
class langchain.utilities.openapi.OpenAPISpec(*, openapi: str = '3.1.0', info: Info, jsonSchemaDialect: Optional[str] = None, servers: List[Server] = [Server(url='/', description=None, variables=None)], paths: Optional[Dict[str, PathItem]] = None, webhooks: Optional[Dict[str, Un... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.openapi.OpenAPISpec.html |
cb4a62bcbf99-1 | REQUIRED. This string MUST be the [version number](#versions)
of the OpenAPI Specification that the OpenAPI document uses.
The openapi field SHOULD be used by tooling to interpret the OpenAPI document.
This is not related to the API [info.version](#infoVersion) string.
param paths: Optional[Dict[str, openapi_schema_pyd... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.openapi.OpenAPISpec.html |
cb4a62bcbf99-2 | Each tag name in the list MUST be unique.
param webhooks: Optional[Dict[str, Union[openapi_schema_pydantic.v3.v3_1_0.path_item.PathItem, openapi_schema_pydantic.v3.v3_1_0.reference.Reference]]] = None¶
The incoming webhooks that MAY be received as part of this API and that the API consumer MAY choose to implement.
Clos... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.openapi.OpenAPISpec.html |
cb4a62bcbf99-3 | get_parameters_for_operation(operation: Operation) → List[Parameter][source]¶
Get the components for a given operation.
get_parameters_for_path(path: str) → List[Parameter][source]¶
get_referenced_schema(ref: Reference) → Schema[source]¶
Get a schema (or nested reference) or err.
get_request_body_for_operation(operatio... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.openapi.OpenAPISpec.html |
f040afbb12fe-0 | langchain.utilities.powerbi.json_to_md¶
langchain.utilities.powerbi.json_to_md(json_contents: List[Dict[str, Union[str, int, float]]], table_name: Optional[str] = None) → str[source]¶
Converts a JSON object to a markdown table. | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.powerbi.json_to_md.html |
92ebac41992a-0 | langchain.utilities.google_serper.GoogleSerperAPIWrapper¶
class langchain.utilities.google_serper.GoogleSerperAPIWrapper(*, k: int = 10, gl: str = 'us', hl: str = 'en', type: Literal['news', 'search', 'places', 'images'] = 'search', tbs: Optional[str] = None, serper_api_key: Optional[str] = None, aiosession: Optional[C... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.google_serper.GoogleSerperAPIWrapper.html |
92ebac41992a-1 | async arun(query: str, **kwargs: Any) → str[source]¶
Run query through GoogleSearch and parse result async.
results(query: str, **kwargs: Any) → Dict[source]¶
Run query through GoogleSearch.
run(query: str, **kwargs: Any) → str[source]¶
Run query through GoogleSearch and parse result.
validator validate_environment » ... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.google_serper.GoogleSerperAPIWrapper.html |
afd05bfcdca7-0 | langchain.utilities.python.PythonREPL¶
class langchain.utilities.python.PythonREPL(*, _globals: Optional[Dict] = None, _locals: Optional[Dict] = None)[source]¶
Bases: BaseModel
Simulates a standalone Python REPL.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if t... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.python.PythonREPL.html |
be80775b4a84-0 | langchain.utilities.bibtex.BibtexparserWrapper¶
class langchain.utilities.bibtex.BibtexparserWrapper[source]¶
Bases: BaseModel
Wrapper around bibtexparser.
To use, you should have the bibtexparser python package installed.
https://bibtexparser.readthedocs.io/en/master/
This wrapper will use bibtexparser to load a colle... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.bibtex.BibtexparserWrapper.html |
dbf2a00dd48b-0 | langchain.utilities.wikipedia.WikipediaAPIWrapper¶
class langchain.utilities.wikipedia.WikipediaAPIWrapper(*, wiki_client: Any = None, top_k_results: int = 3, lang: str = 'en', load_all_available_meta: bool = False, doc_content_chars_max: int = 4000)[source]¶
Bases: BaseModel
Wrapper around WikipediaAPI.
To use, you sh... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.wikipedia.WikipediaAPIWrapper.html |
e974631fce49-0 | langchain.utilities.awslambda.LambdaWrapper¶
class langchain.utilities.awslambda.LambdaWrapper(*, lambda_client: Any = None, function_name: Optional[str] = None, awslambda_tool_name: Optional[str] = None, awslambda_tool_description: Optional[str] = None)[source]¶
Bases: BaseModel
Wrapper for AWS Lambda SDK.
Docs for us... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.awslambda.LambdaWrapper.html |
155df39af40f-0 | langchain.utilities.scenexplain.SceneXplainAPIWrapper¶
class langchain.utilities.scenexplain.SceneXplainAPIWrapper(_env_file: Optional[Union[str, PathLike, List[Union[str, PathLike]], Tuple[Union[str, PathLike], ...]]] = '<object object>', _env_file_encoding: Optional[str] = None, _env_nested_delimiter: Optional[str] =... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.scenexplain.SceneXplainAPIWrapper.html |
155df39af40f-1 | model Config¶
Bases: BaseConfig
getter_dict¶
alias of GetterDict
classmethod customise_sources(init_settings: Callable[[BaseSettings], Dict[str, Any]], env_settings: Callable[[BaseSettings], Dict[str, Any]], file_secret_settings: Callable[[BaseSettings], Dict[str, Any]]) → Tuple[Callable[[BaseSettings], Dict[str, Any]]... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.scenexplain.SceneXplainAPIWrapper.html |
155df39af40f-2 | representation.
If specified, separators should be an (item_separator, key_separator)
tuple. The default is (', ', ': ') if indent is None and
(',', ': ') otherwise. To get the most compact JSON representation,
you should specify (',', ':') to eliminate whitespace.
default(obj) is a function that should return a seri... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.scenexplain.SceneXplainAPIWrapper.html |
155df39af40f-3 | for JSON floats (e.g. decimal.Decimal).
parse_int, if specified, will be called with the string
of every JSON int to be decoded. By default this is equivalent to
int(num_str). This can be used to use another datatype or parser
for JSON integers (e.g. float).
parse_constant, if specified, will be called with one of the
... | https://api.python.langchain.com/en/latest/utilities/langchain.utilities.scenexplain.SceneXplainAPIWrapper.html |
2c4100e21f1c-0 | langchain.output_parsers.boolean.BooleanOutputParser¶
class langchain.output_parsers.boolean.BooleanOutputParser(*, true_val: str = 'YES', false_val: str = 'NO')[source]¶
Bases: BaseOutputParser[bool]
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input dat... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.boolean.BooleanOutputParser.html |
2c4100e21f1c-1 | property lc_secrets: Dict[str, str]¶
Return a map of constructor argument names to secret ids.
eg. {“openai_api_key”: “OPENAI_API_KEY”}
property lc_serializable: bool¶
Return whether or not the class is serializable.
model Config¶
Bases: object
extra = 'ignore'¶ | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.boolean.BooleanOutputParser.html |
303a5f7006d9-0 | langchain.output_parsers.fix.OutputFixingParser¶
class langchain.output_parsers.fix.OutputFixingParser(*, parser: BaseOutputParser[T], retry_chain: LLMChain)[source]¶
Bases: BaseOutputParser[T]
Wraps a parser and tries to fix parsing errors.
Create a new model by parsing and validating input data from keyword arguments... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.fix.OutputFixingParser.html |
303a5f7006d9-1 | parse_result(result: List[Generation]) → T¶
Parse LLM Result.
parse_with_prompt(completion: str, prompt: PromptValue) → Any¶
Optional method to parse the output of an LLM call with a prompt.
The prompt is largely provided in the event the OutputParser wants
to retry or fix the output in some way, and needs information ... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.fix.OutputFixingParser.html |
ad350233fbc9-0 | langchain.output_parsers.list.CommaSeparatedListOutputParser¶
class langchain.output_parsers.list.CommaSeparatedListOutputParser[source]¶
Bases: ListOutputParser
Parse out comma separated lists.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cann... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.list.CommaSeparatedListOutputParser.html |
ad350233fbc9-1 | property lc_serializable: bool¶
Return whether or not the class is serializable.
model Config¶
Bases: object
extra = 'ignore'¶ | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.list.CommaSeparatedListOutputParser.html |
e10d746acbc6-0 | langchain.output_parsers.list.ListOutputParser¶
class langchain.output_parsers.list.ListOutputParser[source]¶
Bases: BaseOutputParser
Class to parse the output of an LLM call to a list.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be par... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.list.ListOutputParser.html |
e10d746acbc6-1 | property lc_serializable: bool¶
Return whether or not the class is serializable.
model Config¶
Bases: object
extra = 'ignore'¶ | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.list.ListOutputParser.html |
1528f54609be-0 | langchain.output_parsers.combining.CombiningOutputParser¶
class langchain.output_parsers.combining.CombiningOutputParser(*, parsers: List[BaseOutputParser])[source]¶
Bases: BaseOutputParser
Class to combine multiple output parsers into one.
Create a new model by parsing and validating input data from keyword arguments.... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.combining.CombiningOutputParser.html |
1528f54609be-1 | eg. [“langchain”, “llms”, “openai”]
property lc_secrets: Dict[str, str]¶
Return a map of constructor argument names to secret ids.
eg. {“openai_api_key”: “OPENAI_API_KEY”}
property lc_serializable: bool¶
Return whether or not the class is serializable.
model Config¶
Bases: object
extra = 'ignore'¶ | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.combining.CombiningOutputParser.html |
3435fb553124-0 | langchain.output_parsers.openai_functions.PydanticAttrOutputFunctionsParser¶
class langchain.output_parsers.openai_functions.PydanticAttrOutputFunctionsParser(*, args_only: bool = True, pydantic_schema: Any = None, attr_name: str)[source]¶
Bases: PydanticOutputFunctionsParser
Create a new model by parsing and validatin... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.openai_functions.PydanticAttrOutputFunctionsParser.html |
724e0cc9ff6d-0 | langchain.output_parsers.regex_dict.RegexDictParser¶
class langchain.output_parsers.regex_dict.RegexDictParser(*, regex_pattern: str = "{}:\\s?([^.'\\n']*)\\.?", output_key_to_format: Dict[str, str], no_update_value: Optional[str] = None)[source]¶
Bases: BaseOutputParser
Class to parse the output into a dictionary.
Cre... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.regex_dict.RegexDictParser.html |
724e0cc9ff6d-1 | constructor.
property lc_namespace: List[str]¶
Return the namespace of the langchain object.
eg. [“langchain”, “llms”, “openai”]
property lc_secrets: Dict[str, str]¶
Return a map of constructor argument names to secret ids.
eg. {“openai_api_key”: “OPENAI_API_KEY”}
property lc_serializable: bool¶
Return whether or not t... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.regex_dict.RegexDictParser.html |
940675cc3cec-0 | langchain.output_parsers.json.parse_and_check_json_markdown¶
langchain.output_parsers.json.parse_and_check_json_markdown(text: str, expected_keys: List[str]) → dict[source]¶
Parse a JSON string from a Markdown string and check that it
contains the expected keys.
Parameters
text – The Markdown string.
expected_keys – Th... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.json.parse_and_check_json_markdown.html |
d69240d0110d-0 | langchain.output_parsers.loading.load_output_parser¶
langchain.output_parsers.loading.load_output_parser(config: dict) → dict[source]¶
Load output parser. | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.loading.load_output_parser.html |
5a1489c7615d-0 | langchain.output_parsers.retry.RetryWithErrorOutputParser¶
class langchain.output_parsers.retry.RetryWithErrorOutputParser(*, parser: BaseOutputParser[T], retry_chain: LLMChain)[source]¶
Bases: BaseOutputParser[T]
Wraps a parser and tries to fix parsing errors.
Does this by passing the original prompt, the completion, ... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.retry.RetryWithErrorOutputParser.html |
5a1489c7615d-1 | A method which takes in a string (assumed output of a language model )
and parses it into some structure.
Parameters
text – output of language model
Returns
structured output
parse_result(result: List[Generation]) → T¶
Parse LLM Result.
parse_with_prompt(completion: str, prompt_value: PromptValue) → T[source]¶
Optional... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.retry.RetryWithErrorOutputParser.html |
45e4e1863287-0 | langchain.output_parsers.structured.ResponseSchema¶
class langchain.output_parsers.structured.ResponseSchema(*, name: str, description: str, type: str = 'string')[source]¶
Bases: BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be ... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.structured.ResponseSchema.html |
bebfa17e0150-0 | langchain.output_parsers.retry.RetryOutputParser¶
class langchain.output_parsers.retry.RetryOutputParser(*, parser: BaseOutputParser[T], retry_chain: LLMChain)[source]¶
Bases: BaseOutputParser[T]
Wraps a parser and tries to fix parsing errors.
Does this by passing the original prompt and the completion to another
LLM, ... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.retry.RetryOutputParser.html |
bebfa17e0150-1 | parse_with_prompt(completion: str, prompt_value: PromptValue) → T[source]¶
Optional method to parse the output of an LLM call with a prompt.
The prompt is largely provided in the event the OutputParser wants
to retry or fix the output in some way, and needs information from
the prompt to do so.
Parameters
completion – ... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.retry.RetryOutputParser.html |
bf739c9dd3c8-0 | langchain.output_parsers.enum.EnumOutputParser¶
class langchain.output_parsers.enum.EnumOutputParser(*, enum: Type[Enum])[source]¶
Bases: BaseOutputParser
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
para... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.enum.EnumOutputParser.html |
bf739c9dd3c8-1 | eg. [“langchain”, “llms”, “openai”]
property lc_secrets: Dict[str, str]¶
Return a map of constructor argument names to secret ids.
eg. {“openai_api_key”: “OPENAI_API_KEY”}
property lc_serializable: bool¶
Return whether or not the class is serializable.
model Config¶
Bases: object
extra = 'ignore'¶ | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.enum.EnumOutputParser.html |
1ddf25188369-0 | langchain.output_parsers.openai_functions.OutputFunctionsParser¶
class langchain.output_parsers.openai_functions.OutputFunctionsParser(*, args_only: bool = True)[source]¶
Bases: BaseLLMOutputParser[Any]
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input d... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.openai_functions.OutputFunctionsParser.html |
146b7b425ba6-0 | langchain.output_parsers.structured.StructuredOutputParser¶
class langchain.output_parsers.structured.StructuredOutputParser(*, response_schemas: List[ResponseSchema])[source]¶
Bases: BaseOutputParser
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input dat... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.structured.StructuredOutputParser.html |
146b7b425ba6-1 | constructor.
property lc_namespace: List[str]¶
Return the namespace of the langchain object.
eg. [“langchain”, “llms”, “openai”]
property lc_secrets: Dict[str, str]¶
Return a map of constructor argument names to secret ids.
eg. {“openai_api_key”: “OPENAI_API_KEY”}
property lc_serializable: bool¶
Return whether or not t... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.structured.StructuredOutputParser.html |
c9fe79a9d9e2-0 | langchain.output_parsers.pydantic.PydanticOutputParser¶
class langchain.output_parsers.pydantic.PydanticOutputParser(*, pydantic_object: Type[T])[source]¶
Bases: BaseOutputParser[T]
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed ... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.pydantic.PydanticOutputParser.html |
c9fe79a9d9e2-1 | property lc_namespace: List[str]¶
Return the namespace of the langchain object.
eg. [“langchain”, “llms”, “openai”]
property lc_secrets: Dict[str, str]¶
Return a map of constructor argument names to secret ids.
eg. {“openai_api_key”: “OPENAI_API_KEY”}
property lc_serializable: bool¶
Return whether or not the class is s... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.pydantic.PydanticOutputParser.html |
1d67d87b8789-0 | langchain.output_parsers.datetime.DatetimeOutputParser¶
class langchain.output_parsers.datetime.DatetimeOutputParser(*, format: str = '%Y-%m-%dT%H:%M:%S.%fZ')[source]¶
Bases: BaseOutputParser[datetime]
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input da... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.datetime.DatetimeOutputParser.html |
1d67d87b8789-1 | property lc_namespace: List[str]¶
Return the namespace of the langchain object.
eg. [“langchain”, “llms”, “openai”]
property lc_secrets: Dict[str, str]¶
Return a map of constructor argument names to secret ids.
eg. {“openai_api_key”: “OPENAI_API_KEY”}
property lc_serializable: bool¶
Return whether or not the class is s... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.datetime.DatetimeOutputParser.html |
cf1a2ff8fa9d-0 | langchain.output_parsers.openai_functions.JsonOutputFunctionsParser¶
class langchain.output_parsers.openai_functions.JsonOutputFunctionsParser(*, args_only: bool = True)[source]¶
Bases: OutputFunctionsParser
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the in... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.openai_functions.JsonOutputFunctionsParser.html |
9bfef693fef6-0 | langchain.output_parsers.rail_parser.GuardrailsOutputParser¶
class langchain.output_parsers.rail_parser.GuardrailsOutputParser(*, guard: Any = None, api: Optional[Callable] = None, args: Any = None, kwargs: Any = None)[source]¶
Bases: BaseOutputParser
Create a new model by parsing and validating input data from keyword... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.rail_parser.GuardrailsOutputParser.html |
9bfef693fef6-1 | parse_result(result: List[Generation]) → T¶
Parse LLM Result.
parse_with_prompt(completion: str, prompt: PromptValue) → Any¶
Optional method to parse the output of an LLM call with a prompt.
The prompt is largely provided in the event the OutputParser wants
to retry or fix the output in some way, and needs information ... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.rail_parser.GuardrailsOutputParser.html |
709811056098-0 | langchain.output_parsers.openai_functions.JsonKeyOutputFunctionsParser¶
class langchain.output_parsers.openai_functions.JsonKeyOutputFunctionsParser(*, args_only: bool = True, key_name: str)[source]¶
Bases: JsonOutputFunctionsParser
Create a new model by parsing and validating input data from keyword arguments.
Raises ... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.openai_functions.JsonKeyOutputFunctionsParser.html |
145f0035cd01-0 | langchain.output_parsers.regex.RegexParser¶
class langchain.output_parsers.regex.RegexParser(*, regex: str, output_keys: List[str], default_output_key: Optional[str] = None)[source]¶
Bases: BaseOutputParser
Class to parse the output into a dictionary.
Create a new model by parsing and validating input data from keyword... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.regex.RegexParser.html |
145f0035cd01-1 | eg. [“langchain”, “llms”, “openai”]
property lc_secrets: Dict[str, str]¶
Return a map of constructor argument names to secret ids.
eg. {“openai_api_key”: “OPENAI_API_KEY”}
property lc_serializable: bool¶
Return whether or not the class is serializable.
model Config¶
Bases: object
extra = 'ignore'¶ | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.regex.RegexParser.html |
9ea2907a5c89-0 | langchain.output_parsers.json.parse_json_markdown¶
langchain.output_parsers.json.parse_json_markdown(json_string: str) → dict[source]¶
Parse a JSON string from a Markdown string.
Parameters
json_string – The Markdown string.
Returns
The parsed JSON object as a Python dictionary. | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.json.parse_json_markdown.html |
08e6f88856d5-0 | langchain.output_parsers.openai_functions.PydanticOutputFunctionsParser¶
class langchain.output_parsers.openai_functions.PydanticOutputFunctionsParser(*, args_only: bool = True, pydantic_schema: Any = None)[source]¶
Bases: OutputFunctionsParser
Create a new model by parsing and validating input data from keyword argume... | https://api.python.langchain.com/en/latest/output_parsers/langchain.output_parsers.openai_functions.PydanticOutputFunctionsParser.html |
8eaf1795a9f2-0 | langchain.base_language.BaseLanguageModel¶
class langchain.base_language.BaseLanguageModel[source]¶
Bases: Serializable, ABC
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
abstract async agenerate_prompt(pr... | https://api.python.langchain.com/en/latest/base_language/langchain.base_language.BaseLanguageModel.html |
8eaf1795a9f2-1 | Predict text from text.
abstract predict_messages(messages: List[BaseMessage], *, stop: Optional[Sequence[str]] = None, **kwargs: Any) → BaseMessage[source]¶
Predict message from messages.
to_json() → Union[SerializedConstructor, SerializedNotImplemented]¶
to_json_not_implemented() → SerializedNotImplemented¶
property ... | https://api.python.langchain.com/en/latest/base_language/langchain.base_language.BaseLanguageModel.html |
2b37f8cb857b-0 | langchain.document_loaders.url_selenium.SeleniumURLLoader¶
class langchain.document_loaders.url_selenium.SeleniumURLLoader(urls: List[str], continue_on_failure: bool = True, browser: Literal['chrome', 'firefox'] = 'chrome', binary_location: Optional[str] = None, executable_path: Optional[str] = None, headless: bool = T... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.url_selenium.SeleniumURLLoader.html |
2b37f8cb857b-1 | Returns
A list of Document instances with loaded content.
Return type
List[Document]
load_and_split(text_splitter: Optional[TextSplitter] = None) → List[Document]¶
Load documents and split into chunks. | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.url_selenium.SeleniumURLLoader.html |
f66e3c816526-0 | langchain.document_loaders.epub.UnstructuredEPubLoader¶
class langchain.document_loaders.epub.UnstructuredEPubLoader(file_path: Union[str, List[str]], mode: str = 'single', **unstructured_kwargs: Any)[source]¶
Bases: UnstructuredFileLoader
Loader that uses unstructured to load epub files.
Initialize with file path.
Met... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.epub.UnstructuredEPubLoader.html |
d7f9814b1574-0 | langchain.document_loaders.url_playwright.PlaywrightURLLoader¶
class langchain.document_loaders.url_playwright.PlaywrightURLLoader(urls: List[str], continue_on_failure: bool = True, headless: bool = True, remove_selectors: Optional[List[str]] = None)[source]¶
Bases: BaseLoader
Loader that uses Playwright and to load a ... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.url_playwright.PlaywrightURLLoader.html |
4f11a5b378bf-0 | langchain.document_loaders.parsers.language.language_parser.LanguageParser¶
class langchain.document_loaders.parsers.language.language_parser.LanguageParser(language: Optional[Language] = None, parser_threshold: int = 0)[source]¶
Bases: BaseBlobParser
Language parser that split code using the respective language syntax... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.parsers.language.language_parser.LanguageParser.html |
4f11a5b378bf-1 | Parameters
language – If None (default), it will try to infer language from source.
parser_threshold – Minimum lines needed to activate parsing (0 by default).
Methods
__init__([language, parser_threshold])
Language parser that split code using the respective language syntax.
lazy_parse(blob)
Lazy parsing interface.
pa... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.parsers.language.language_parser.LanguageParser.html |
0ef314eca46c-0 | langchain.document_loaders.git.GitLoader¶
class langchain.document_loaders.git.GitLoader(repo_path: str, clone_url: Optional[str] = None, branch: Optional[str] = 'main', file_filter: Optional[Callable[[str], bool]] = None)[source]¶
Bases: BaseLoader
Loads files from a Git repository into a list of documents.
Repository... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.git.GitLoader.html |
3c71f26f4151-0 | langchain.document_loaders.parsers.pdf.PDFPlumberParser¶
class langchain.document_loaders.parsers.pdf.PDFPlumberParser(text_kwargs: Optional[Mapping[str, Any]] = None)[source]¶
Bases: BaseBlobParser
Parse PDFs with PDFPlumber.
Initialize the parser.
Parameters
text_kwargs – Keyword arguments to pass to pdfplumber.Page.... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.parsers.pdf.PDFPlumberParser.html |
1d488b3c4c03-0 | langchain.document_loaders.blob_loaders.schema.BlobLoader¶
class langchain.document_loaders.blob_loaders.schema.BlobLoader[source]¶
Bases: ABC
Abstract interface for blob loaders implementation.
Implementer should be able to load raw content from a storage system according
to some criteria and return the raw content la... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.blob_loaders.schema.BlobLoader.html |
5ec76c272c4e-0 | langchain.document_loaders.onedrive.OneDriveLoader¶
class langchain.document_loaders.onedrive.OneDriveLoader(*, settings: _OneDriveSettings = None, drive_id: str, folder_path: Optional[str] = None, object_ids: Optional[List[str]] = None, auth_with_token: bool = False)[source]¶
Bases: BaseLoader, BaseModel
Create a new ... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.onedrive.OneDriveLoader.html |
d6de7f649aa4-0 | langchain.document_loaders.telegram.TelegramChatFileLoader¶
class langchain.document_loaders.telegram.TelegramChatFileLoader(path: str)[source]¶
Bases: BaseLoader
Loader that loads Telegram chat json directory dump.
Initialize with path.
Methods
__init__(path)
Initialize with path.
lazy_load()
A lazy loader for documen... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.telegram.TelegramChatFileLoader.html |
bb6520b19ac0-0 | langchain.document_loaders.merge.MergedDataLoader¶
class langchain.document_loaders.merge.MergedDataLoader(loaders: List)[source]¶
Bases: BaseLoader
Merge documents from a list of loaders
Initialize with a list of loaders
Methods
__init__(loaders)
Initialize with a list of loaders
lazy_load()
Lazy load docs from each i... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.merge.MergedDataLoader.html |
6c93e3e23e87-0 | langchain.document_loaders.blackboard.BlackboardLoader¶
class langchain.document_loaders.blackboard.BlackboardLoader(blackboard_course_url: str, bbrouter: str, load_all_recursively: bool = True, basic_auth: Optional[Tuple[str, str]] = None, cookies: Optional[dict] = None)[source]¶
Bases: WebBaseLoader
Loader that loads... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.blackboard.BlackboardLoader.html |
6c93e3e23e87-1 | download(path)
Download a file from a url.
fetch_all(urls)
Fetch all urls concurrently with rate limiting.
lazy_load()
Lazy load text from the url(s) in web_path.
load()
Load data into document objects.
load_and_split([text_splitter])
Load documents and split into chunks.
parse_filename(url)
Parse the filename from a u... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.blackboard.BlackboardLoader.html |
6c93e3e23e87-2 | Load documents and split into chunks.
parse_filename(url: str) → str[source]¶
Parse the filename from a url.
Parameters
url – Url to parse the filename from.
Returns
The filename.
scrape(parser: Optional[str] = None) → Any¶
Scrape data from webpage and return it in BeautifulSoup format.
scrape_all(urls: List[str], pars... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.blackboard.BlackboardLoader.html |
6609da19cbb8-0 | langchain.document_loaders.org_mode.UnstructuredOrgModeLoader¶
class langchain.document_loaders.org_mode.UnstructuredOrgModeLoader(file_path: str, mode: str = 'single', **unstructured_kwargs: Any)[source]¶
Bases: UnstructuredFileLoader
Loader that uses unstructured to load Org-Mode files.
Initialize with file path.
Met... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.org_mode.UnstructuredOrgModeLoader.html |
35ae80bdb879-0 | langchain.document_loaders.azure_blob_storage_container.AzureBlobStorageContainerLoader¶
class langchain.document_loaders.azure_blob_storage_container.AzureBlobStorageContainerLoader(conn_str: str, container: str, prefix: str = '')[source]¶
Bases: BaseLoader
Loading logic for loading documents from Azure Blob Storage.
... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.azure_blob_storage_container.AzureBlobStorageContainerLoader.html |
d774ce3a3001-0 | langchain.document_loaders.bigquery.BigQueryLoader¶
class langchain.document_loaders.bigquery.BigQueryLoader(query: str, project: Optional[str] = None, page_content_columns: Optional[List[str]] = None, metadata_columns: Optional[List[str]] = None, credentials: Optional[Credentials] = None)[source]¶
Bases: BaseLoader
Lo... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.bigquery.BigQueryLoader.html |
d774ce3a3001-1 | Load documents and split into chunks. | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.bigquery.BigQueryLoader.html |
2db69461ec52-0 | langchain.document_loaders.azure_blob_storage_file.AzureBlobStorageFileLoader¶
class langchain.document_loaders.azure_blob_storage_file.AzureBlobStorageFileLoader(conn_str: str, container: str, blob_name: str)[source]¶
Bases: BaseLoader
Loading logic for loading documents from Azure Blob Storage.
Initialize with connec... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.azure_blob_storage_file.AzureBlobStorageFileLoader.html |
51d264b70545-0 | langchain.document_loaders.parsers.audio.OpenAIWhisperParser¶
class langchain.document_loaders.parsers.audio.OpenAIWhisperParser[source]¶
Bases: BaseBlobParser
Transcribe and parse audio files.
Audio transcription is with OpenAI Whisper model.
Methods
__init__()
lazy_parse(blob)
Lazily parse the blob.
parse(blob)
Eager... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.parsers.audio.OpenAIWhisperParser.html |
1577e4ba45fe-0 | langchain.document_loaders.confluence.ConfluenceLoader¶
class langchain.document_loaders.confluence.ConfluenceLoader(url: str, api_key: Optional[str] = None, username: Optional[str] = None, oauth2: Optional[dict] = None, token: Optional[str] = None, cloud: Optional[bool] = True, number_of_retries: Optional[int] = 3, mi... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.confluence.ConfluenceLoader.html |
1577e4ba45fe-1 | Example
from langchain.document_loaders import ConfluenceLoader
loader = ConfluenceLoader(
url="https://yoursite.atlassian.com/wiki",
username="me",
api_key="12345"
)
documents = loader.load(space_key="SPACE",limit=50)
Parameters
url (str) – _description_
api_key (str, optional) – _description_, defaults to... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.confluence.ConfluenceLoader.html |
1577e4ba45fe-2 | process_image(link[, ocr_languages])
process_page(page, include_attachments, ...)
process_pages(pages, ...[, ocr_languages])
Process a list of pages into a list of documents.
process_pdf(link[, ocr_languages])
process_svg(link[, ocr_languages])
process_xls(link)
validate_init_args([url, api_key, username, ...])
Validat... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.confluence.ConfluenceLoader.html |
1577e4ba45fe-3 | include_comments (bool, optional) – defaults to False
content_format (ContentFormat) – Specify content format, defaults to ContentFormat.STORAGE
limit (int, optional) – Maximum number of pages to retrieve per request, defaults to 50
max_pages (int, optional) – Maximum number of pages to retrieve in total, defaults 1000... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.confluence.ConfluenceLoader.html |
1577e4ba45fe-4 | Returns
List of documents
Return type
List
process_attachment(page_id: str, ocr_languages: Optional[str] = None) → List[str][source]¶
process_doc(link: str) → str[source]¶
process_image(link: str, ocr_languages: Optional[str] = None) → str[source]¶
process_page(page: dict, include_attachments: bool, include_comments: b... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.confluence.ConfluenceLoader.html |
6d820b2f8c6d-0 | langchain.document_loaders.embaas.EmbaasDocumentExtractionParameters¶
class langchain.document_loaders.embaas.EmbaasDocumentExtractionParameters[source]¶
Bases: TypedDict
Parameters for the embaas document extraction API.
Methods
__init__(*args, **kwargs)
clear()
copy()
fromkeys([value])
Create a new dictionary with ke... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.embaas.EmbaasDocumentExtractionParameters.html |
6d820b2f8c6d-1 | should_embed
Whether to create embeddings for the document in the response.
model
The model to pass to the Embaas document extraction API.
instruction
The instruction to pass to the Embaas document extraction API.
clear() → None. Remove all items from D.¶
copy() → a shallow copy of D¶
fromkeys(value=None, /)¶
Create a... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.embaas.EmbaasDocumentExtractionParameters.html |
6d820b2f8c6d-2 | values() → an object providing a view on D's values¶
chunk_overlap: int¶
The maximum overlap allowed between chunks.
chunk_size: int¶
The maximum size of the text chunks.
chunk_splitter: str¶
The text splitter class name for creating chunks.
file_extension: str¶
The file extension of the document.
file_name: str¶
The f... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.embaas.EmbaasDocumentExtractionParameters.html |
8cd85f08e19f-0 | langchain.document_loaders.notebook.concatenate_cells¶
langchain.document_loaders.notebook.concatenate_cells(cell: dict, include_outputs: bool, max_output_length: int, traceback: bool) → str[source]¶
Combine cells information in a readable format ready to be used. | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.notebook.concatenate_cells.html |
67c1622da840-0 | langchain.document_loaders.embaas.BaseEmbaasLoader¶
class langchain.document_loaders.embaas.BaseEmbaasLoader(*, embaas_api_key: Optional[str] = None, api_url: str = 'https://api.embaas.io/v1/document/extract-text/bytes/', params: EmbaasDocumentExtractionParameters = {})[source]¶
Bases: BaseModel
Create a new model by p... | https://api.python.langchain.com/en/latest/document_loaders/langchain.document_loaders.embaas.BaseEmbaasLoader.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.