id stringlengths 14 16 | text stringlengths 31 2.41k | source stringlengths 54 121 |
|---|---|---|
1a644f703b6b-28 | None
on_chain_start(serialized, inputs, **kwargs)[source]ο
Run when chain starts running.
Parameters
serialized (Dict[str, Any]) β
inputs (Dict[str, Any]) β
kwargs (Any) β
Return type
None
on_chain_end(outputs, **kwargs)[source]ο
Run when chain ends running.
Parameters
outputs (Dict[str, Any]) β
kwargs (Any) β
Ret... | https://api.python.langchain.com/en/latest/modules/callbacks.html |
1a644f703b6b-29 | Run on agent action.
Parameters
action (langchain.schema.AgentAction) β
kwargs (Any) β
Return type
Any
flush_tracker(langchain_asset=None, reset=True, finish=False, job_type=None, project=None, entity=None, tags=None, group=None, name=None, notes=None, visualize=None, complexity_metrics=None)[source]ο
Flush the track... | https://api.python.langchain.com/en/latest/modules/callbacks.html |
1a644f703b6b-30 | kwargs (Any) β
Return type
None
on_llm_new_token(token, **kwargs)[source]ο
Do nothing.
Parameters
token (str) β
kwargs (Any) β
Return type
None
on_llm_error(error, **kwargs)[source]ο
Do nothing.
Parameters
error (Union[Exception, KeyboardInterrupt]) β
kwargs (Any) β
Return type
None
on_chain_start(serialized, inpu... | https://api.python.langchain.com/en/latest/modules/callbacks.html |
1a644f703b6b-31 | color (Optional[str]) β
observation_prefix (Optional[str]) β
llm_prefix (Optional[str]) β
kwargs (Any) β
Return type
None
on_tool_error(error, **kwargs)[source]ο
Do nothing.
Parameters
error (Union[Exception, KeyboardInterrupt]) β
kwargs (Any) β
Return type
None
on_text(text, **kwargs)[source]ο
Do nothing.
Parame... | https://api.python.langchain.com/en/latest/modules/callbacks.html |
1a644f703b6b-32 | sentiment analysis compound score. Defaults to False and will not gather
this metric.
toxicity (bool) β If True will initialize a model to score
toxicity. Defaults to False and will not gather this metric.
themes (bool) β If True will initialize a model to calculate
distance to configured themes. Defaults to None and w... | https://api.python.langchain.com/en/latest/modules/callbacks.html |
98c621fca5f3-0 | Document Loadersο
All different types of document loaders.
class langchain.document_loaders.AcreomLoader(path, encoding='UTF-8', collect_metadata=True)[source]ο
Bases: langchain.document_loaders.base.BaseLoader
Parameters
path (str) β
encoding (str) β
collect_metadata (bool) β
FRONT_MATTER_REGEX = re.compile('^---\\... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-1 | Parameters
api_token (str) β
table_id (str) β
base_id (str) β
lazy_load()[source]ο
Lazy load records from table.
Return type
Iterator[langchain.schema.Document]
load()[source]ο
Load Table.
Return type
List[langchain.schema.Document]
class langchain.document_loaders.ApifyDatasetLoader(dataset_id, dataset_mapping_func... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-2 | Load data into document objects.
Return type
List[langchain.schema.Document]
class langchain.document_loaders.AzureBlobStorageContainerLoader(conn_str, container, prefix='')[source]ο
Bases: langchain.document_loaders.base.BaseLoader
Loading logic for loading documents from Azure Blob Storage.
Parameters
conn_str (str) ... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-3 | Loads a bibtex file into a list of Documents.
Each document represents one entry from the bibtex file.
If a PDF file is present in the file bibtex field, the original PDF
is loaded into the document text. If no such file entry is present,
the abstract field is used instead.
Parameters
file_path (str) β
parser (Optiona... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-4 | are written into the page_content and none into the metadata.
Parameters
query (str) β
project (Optional[str]) β
page_content_columns (Optional[List[str]]) β
metadata_columns (Optional[List[str]]) β
credentials (Optional[Credentials]) β
load()[source]ο
Load data into document objects.
Return type
List[langchain.sc... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-5 | blackboard_course_url (str) β
bbrouter (str) β
load_all_recursively (bool) β
basic_auth (Optional[Tuple[str, str]]) β
cookies (Optional[dict]) β
folder_path: strο
base_url: strο
load_all_recursively: boolο
check_bs4()[source]ο
Check if BeautifulSoup4 is installed.
Raises
ImportError β If BeautifulSoup4 is not inst... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-6 | None
attribute data: Optional[Union[bytes, str]] = Noneο
attribute encoding: str = 'utf-8'ο
attribute mimetype: Optional[str] = Noneο
attribute path: Optional[Union[str, pathlib.PurePath]] = Noneο
as_bytes()[source]ο
Read data as bytes.
Return type
bytes
as_bytes_io()[source]ο
Read data as a byte stream.
Return type
Ge... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-7 | if a mime-type was not provided
Returns
Blob instance
Return type
langchain.document_loaders.blob_loaders.schema.Blob
property source: Optional[str]ο
The source location of the blob as string if known otherwise none.
class langchain.document_loaders.BlobLoader[source]ο
Bases: abc.ABC
Abstract interface for blob loaders... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-8 | Default value is false for this reason.
The max_execution_time (sec) can be set to limit the execution time
of the loader.
Future versions of this loader can:
Support additional Alchemy APIs (e.g. getTransactions, etc.)
Support additional blockain APIs (e.g. Infura, Opensea, etc.)
Parameters
contract_address (str) β
b... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-9 | load()[source]ο
Load data into document objects.
Return type
List[langchain.schema.Document]
class langchain.document_loaders.ChatGPTLoader(log_file, num_logs=- 1)[source]ο
Bases: langchain.document_loaders.base.BaseLoader
Loader that loads conversations from exported ChatGPT data.
Parameters
log_file (str) β
num_logs... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-10 | This currently supports username/api_key, Oauth2 login or personal access token
authentication.
Specify a list page_ids and/or space_key to load in the corresponding pages into
Document objects, if both are specified the union of both sets will be returned.
You can also specify a boolean include_attachments to include ... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-11 | cloud (bool, optional) β _description_, defaults to True
number_of_retries (Optional[int], optional) β How many times to retry, defaults to 3
min_retry_seconds (Optional[int], optional) β defaults to 2
max_retry_seconds (Optional[int], optional) β defaults to 10
confluence_kwargs (dict, optional) β additional kwargs to... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-12 | 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/modules/document_loaders.html |
98c621fca5f3-13 | Check if a page is publicly accessible.
Parameters
page (dict) β
Return type
bool
process_pages(pages, include_restricted_content, include_attachments, include_comments, content_format, ocr_languages=None)[source]ο
Process a list of pages into a list of documents.
Parameters
pages (List[dict]) β
include_restricted_co... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-14 | str
process_svg(link, ocr_languages=None)[source]ο
Parameters
link (str) β
ocr_languages (Optional[str]) β
Return type
str
class langchain.document_loaders.DataFrameLoader(data_frame, page_content_column='text')[source]ο
Bases: langchain.document_loaders.base.BaseLoader
Load Pandas DataFrames.
Parameters
data_frame (... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-15 | silent_errors (bool) β
load_hidden (bool) β
loader_cls (Union[Type[langchain.document_loaders.unstructured.UnstructuredFileLoader], Type[langchain.document_loaders.text.TextLoader], Type[langchain.document_loaders.html_bs.BSHTMLLoader]]) β
loader_kwargs (Optional[dict]) β
recursive (bool) β
show_progress (bool) β ... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-16 | Parameters
api (str) β
access_token (Optional[str]) β
docset_id (Optional[str]) β
document_ids (Optional[Sequence[str]]) β
file_paths (Optional[Sequence[Union[pathlib.Path, str]]]) β
min_chunk_size (int) β
Return type
None
attribute access_token: Optional[str] = Noneο
attribute api: str = 'https://api.docugami.co... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-17 | Each document represents one row of the result. The page_content_columns
are written into the page_content of the document. The metadata_columns
are written into the metadata of the document. By default, all columns
are written into the page_content and none into the metadata.
Parameters
query (str) β
database (str) β... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-18 | "chunk_splitter": "CharacterTextSplitter"
}
)
blob = Blob.from_path(path="example.pdf")
documents = loader.parse(blob=blob)
Parameters
embaas_api_key (Optional[str]) β
api_url (str) β
params (langchain.document_loaders.embaas.EmbaasDocumentExtractionParameters) β
Return type
None
lazy_parse(blob)[source]ο
Lazy p... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-19 | "chunk_size": 256,
"chunk_splitter": "CharacterTextSplitter"
}
)
documents = loader.load()
Parameters
embaas_api_key (Optional[str]) β
api_url (str) β
params (langchain.document_loaders.embaas.EmbaasDocumentExtractionParameters) β
file_path (str) β
blob_loader (Optional[langchain.document_loaders.embaas... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-20 | Currently only the plain text in the note is extracted and stored as the contents
of the Document, any non content metadata (e.g. βauthorβ, βcreatedβ, βupdatedβ etc.
but not βcontent-rawβ or βresourceβ) tags on the note will be extracted and stored
as metadata on the Document.
Parameters
file_path (str) β The path to t... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-21 | Optional list of field names to include in metadata.
Type
Optional[Sequence[str]]
load()[source]ο
Load data into document objects.
Return type
List[langchain.schema.Document]
lazy_load()[source]ο
A lazy loader for document content.
Return type
Iterator[langchain.schema.Document]
class langchain.document_loaders.FigmaFi... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-22 | Bases: langchain.document_loaders.base.BaseLoader
Loading logic for loading documents from GCS.
Parameters
project_name (str) β
bucket (str) β
prefix (str) β
load()[source]ο
Load documents.
Return type
List[langchain.schema.Document]
class langchain.document_loaders.GCSFileLoader(project_name, bucket, blob)[source]ο... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-23 | Return type
None
attribute assignee: Optional[str] = Noneο
Filter on assigned user. Pass βnoneβ for no user and β*β for any user.
attribute creator: Optional[str] = Noneο
Filter on the user that created the issue.
attribute direction: Optional[Literal['asc', 'desc']] = Noneο
The direction to sort the results by. Can be... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-24 | Returns
page_content
metadata
url
title
creator
created_at
last_update_time
closed_time
number of comments
state
labels
assignee
assignees
milestone
locked
number
is_pull_request
Return type
A list of Documents with attributes
load()[source]ο
Get issues of a GitHub repository.
Returns
page_content
metadata
url
title
cr... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-25 | Load data into document objects.
Return type
List[langchain.schema.Document]
class langchain.document_loaders.GitbookLoader(web_page, load_all_paths=False, base_url=None, content_selector='main')[source]ο
Bases: langchain.document_loaders.web_base.WebBaseLoader
Load GitBook data.
load from either a single page, or
load... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-26 | service_account_path: pathlib.Path = PosixPath('/home/docs/.credentials/credentials.json')ο
token_path: pathlib.Path = PosixPath('/home/docs/.credentials/token.json')ο
classmethod validate_channel_or_videoIds_is_set(values)[source]ο
Validate that either folder_id or document_ids is set, but not both.
Parameters
values ... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-27 | Return type
None
google_api_client: langchain.document_loaders.youtube.GoogleApiClientο
channel_name: Optional[str] = Noneο
video_ids: Optional[List[str]] = Noneο
add_video_info: bool = Trueο
captions_language: str = 'en'ο
continue_on_failure: bool = Falseο
classmethod validate_channel_or_videoIds_is_set(values)[source... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-28 | file_loader_kwargs (Dict[str, Any]) β
Return type
None
attribute credentials_path: pathlib.Path = PosixPath('/home/docs/.credentials/credentials.json')ο
attribute document_ids: Optional[List[str]] = Noneο
attribute file_ids: Optional[List[str]] = Noneο
attribute file_loader_cls: Any = Noneο
attribute file_loader_kwarg... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-29 | title
content
source url,
time of post
author of the post
number of comments
rank of the post
Return type
List[langchain.schema.Document]
load_comments(soup_info)[source]ο
Load comments from a HN post.
Parameters
soup_info (Any) β
Return type
List[langchain.schema.Document]
load_results(soup)[source]ο
Load items from ... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-30 | Bases: langchain.document_loaders.base.BaseLoader
Load iFixit repair guides, device wikis and answers.
iFixit is the largest, open repair community on the web. The site contains nearly
100k repair manuals, 200k Questions & Answers on 42k devices, and all the data is
licensed under CC-BY.
This loader will allow you to d... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-31 | verify (Optional[bool]) β
load()[source]ο
Load webpage.
Return type
List[langchain.schema.Document]
class langchain.document_loaders.ImageCaptionLoader(path_images, blip_processor='Salesforce/blip-image-captioning-base', blip_model='Salesforce/blip-image-captioning-base')[source]ο
Bases: langchain.document_loaders.bas... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-32 | file_path (Union[str, pathlib.Path]) β
jq_schema (str) β
content_key (Optional[str]) β
metadata_func (Optional[Callable[[Dict, Dict], Dict]]) β
text_content (bool) β
load()[source]ο
Load and return documents from the JSON file.
Return type
List[langchain.schema.Document]
class langchain.document_loaders.JoplinLoad... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-33 | encoding="utf8"
)
docs = loader.load()
from langchain.text_splitter import RecursiveCharacterTextSplitter
text_splitter = RecursiveCharacterTextSplitter(
chunk_size=1000, chunk_overlap=0
)
texts = text_splitter.split_documents(docs)
Parameters
file_path (str) β XML local file path
encoding (str, optional) β Charset... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-34 | property data: dictο
send_pdf()[source]ο
Return type
str
wait_for_processing(pdf_id)[source]ο
Parameters
pdf_id (str) β
Return type
None
get_processed_pdf(pdf_id)[source]ο
Parameters
pdf_id (str) β
Return type
str
clean_pdf(contents)[source]ο
Parameters
contents (str) β
Return type
str
load()[source]ο
Load data into... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-35 | Return type
langchain.document_loaders.max_compute.MaxComputeLoader
lazy_load()[source]ο
A lazy loader for document content.
Return type
Iterator[langchain.schema.Document]
load()[source]ο
Load data into document objects.
Return type
List[langchain.schema.Document]
class langchain.document_loaders.MergedDataLoader(load... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-36 | Load data into document objects.
Return type
List[langchain.schema.Document]
class langchain.document_loaders.NotebookLoader(path, include_outputs=False, max_output_length=10, remove_newline=False, traceback=False)[source]ο
Bases: langchain.document_loaders.base.BaseLoader
Loader that loads .ipynb notebook files.
Param... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-37 | Bases: langchain.document_loaders.base.BaseLoader
Loader that loads Notion directory dump.
Parameters
path (str) β
load()[source]ο
Load documents.
Return type
List[langchain.schema.Document]
class langchain.document_loaders.ObsidianLoader(path, encoding='UTF-8', collect_metadata=True)[source]ο
Bases: langchain.documen... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-38 | attribute drive_id: str [Required]ο
attribute folder_path: Optional[str] = Noneο
attribute object_ids: Optional[List[str]] = Noneο
attribute settings: langchain.document_loaders.onedrive._OneDriveSettings [Optional]ο
load()[source]ο
Loads all supported document files from the specified OneDrive drive a
nd returns a lis... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-39 | load()[source]ο
Load records.
Return type
List[langchain.schema.Document]
class langchain.document_loaders.PDFMinerLoader(file_path)[source]ο
Bases: langchain.document_loaders.pdf.BasePDFLoader
Loader that uses PDFMiner to load PDF files.
Parameters
file_path (str) β
Return type
None
load()[source]ο
Eagerly load the c... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-40 | Bases: langchain.document_loaders.base.BaseLoader
Loader that uses Playwright and to load a page and unstructured to load the html.
This is useful for loading pages that require javascript to render.
Parameters
urls (List[str]) β
continue_on_failure (bool) β
headless (bool) β
remove_selectors (Optional[List[str]]) β... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-41 | kwargs (Optional[Any]) β
Return type
List[langchain.schema.Document]
class langchain.document_loaders.PyPDFDirectoryLoader(path, glob='**/[!.]*.pdf', silent_errors=False, load_hidden=False, recursive=False)[source]ο
Bases: langchain.document_loaders.base.BaseLoader
Loads a directory with PDF files with pypdf and chunk... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-42 | Lazy load given path as pages.
Return type
Iterator[langchain.schema.Document]
class langchain.document_loaders.PySparkDataFrameLoader(spark_session=None, df=None, page_content_column='text', fraction_of_memory=0.1)[source]ο
Bases: langchain.document_loaders.base.BaseLoader
Load PySpark DataFrames
Parameters
spark_sess... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-43 | Bases: langchain.document_loaders.base.BaseLoader
Loader that loads all child links from a given url.
Parameters
url (str) β
exclude_dirs (Optional[str]) β
Return type
None
get_child_links_recursive(url, visited=None)[source]ο
Recursively get all child links starting with the path of the input URL.
Parameters
url (st... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-44 | Load documents.
Return type
List[langchain.schema.Document]
class langchain.document_loaders.S3DirectoryLoader(bucket, prefix='')[source]ο
Bases: langchain.document_loaders.base.BaseLoader
Loading logic for loading documents from s3.
Parameters
bucket (str) β
prefix (str) β
load()[source]ο
Load documents.
Return type... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-45 | headless (bool) β
arguments (List[str]) β
urlsο
List of URLs to load.
Type
List[str]
continue_on_failureο
If True, continue loading other URLs on failure.
Type
bool
browserο
The browser to use, either βchromeβ or βfirefoxβ.
Type
str
binary_locationο
The location of the browser binary.
Type
Optional[str]
executable_pa... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-46 | Load sitemap.
Return type
List[langchain.schema.Document]
class langchain.document_loaders.SlackDirectoryLoader(zip_path, workspace_url=None)[source]ο
Bases: langchain.document_loaders.base.BaseLoader
Loader for loading documents from a Slack directory dump.
Parameters
zip_path (str) β
workspace_url (Optional[str]) β ... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-47 | class langchain.document_loaders.SpreedlyLoader(access_token, resource)[source]ο
Bases: langchain.document_loaders.base.BaseLoader
Loader that fetches data from Spreedly API.
Parameters
access_token (str) β
resource (str) β
Return type
None
load()[source]ο
Load data into document objects.
Return type
List[langchain.s... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-48 | Parameters
path (str) β
load()[source]ο
Load documents.
Return type
List[langchain.schema.Document]
langchain.document_loaders.TelegramChatLoaderο
alias of langchain.document_loaders.telegram.TelegramChatFileLoader
class langchain.document_loaders.TextLoader(file_path, encoding=None, autodetect_encoding=False)[source]... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-49 | load()[source]ο
Load and return all documents.
Return type
List[langchain.schema.Document]
lazy_load()[source]ο
Lazily load the TOML documents from the source file or directory.
Return type
Iterator[langchain.schema.Document]
class langchain.document_loaders.TrelloLoader(client, board_name, *, include_card_name=True, i... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-50 | βallβ.
extra_metadata β List of additional metadata fields to include as document
metadata.Valid values are βdue_dateβ, βlabelsβ, βlistβ, βclosedβ.
kwargs (Any) β
Return type
langchain.document_loaders.trello.TrelloLoader
load()[source]ο
Loads all cards from the specified Trello board.
You can filter the cards, metada... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-51 | Create a TwitterTweetLoader from access tokens and secrets.
Parameters
access_token (str) β
access_token_secret (str) β
consumer_key (str) β
consumer_secret (str) β
twitter_users (Sequence[str]) β
number_tweets (Optional[int]) β
Return type
langchain.document_loaders.twitter.TwitterTweetLoader
class langchain.doc... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-52 | mode (str) β
unstructured_kwargs (Any) β
class langchain.document_loaders.UnstructuredEPubLoader(file_path, mode='single', **unstructured_kwargs)[source]ο
Bases: langchain.document_loaders.unstructured.UnstructuredFileLoader
Loader that uses unstructured to load epub files.
Parameters
file_path (Union[str, List[str]]... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-53 | Bases: langchain.document_loaders.unstructured.UnstructuredBaseLoader
Loader that uses unstructured to load files.
Parameters
file_path (Union[str, List[str]]) β
mode (str) β
unstructured_kwargs (Any) β
class langchain.document_loaders.UnstructuredHTMLLoader(file_path, mode='single', **unstructured_kwargs)[source]ο
... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-54 | mode (str) β
unstructured_kwargs (Any) β
class langchain.document_loaders.UnstructuredPDFLoader(file_path, mode='single', **unstructured_kwargs)[source]ο
Bases: langchain.document_loaders.unstructured.UnstructuredFileLoader
Loader that uses unstructured to load PDF files.
Parameters
file_path (Union[str, List[str]]) ... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-55 | Bases: langchain.document_loaders.base.BaseLoader
Loader that uses unstructured to load HTML files.
Parameters
urls (List[str]) β
continue_on_failure (bool) β
mode (str) β
show_progress_bar (bool) β
unstructured_kwargs (Any) β
load()[source]ο
Load file.
Return type
List[langchain.schema.Document]
class langchain.d... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-56 | openweathermap_api_key (Optional[str]) β
Return type
langchain.document_loaders.weather.WeatherDataLoader
lazy_load()[source]ο
Lazily load weather data for the given locations.
Return type
Iterator[langchain.schema.Document]
load()[source]ο
Load weather data for the given locations.
Return type
List[langchain.schema.D... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-57 | Return type
Any
lazy_load()[source]ο
Lazy load text from the url(s) in web_path.
Return type
Iterator[langchain.schema.Document]
load()[source]ο
Load text from the url(s) in web_path.
Return type
List[langchain.schema.Document]
aload()[source]ο
Load text from the urls in web_path async into Documents.
Return type
List[... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
98c621fca5f3-58 | Load YouTube urls as audio file(s).
Parameters
urls (List[str]) β
save_dir (str) β
yield_blobs()[source]ο
Yield audio blobs for each url.
Return type
Iterable[langchain.document_loaders.blob_loaders.schema.Blob]
class langchain.document_loaders.YoutubeLoader(video_id, add_video_info=False, language='en', translation=... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
6c0374edea1b-0 | Experimentalο
This module contains experimental modules and reproductions of existing work using LangChain primitives.
Autonomous agentsο
Here, we document the BabyAGI and AutoGPT classes from the langchain.experimental module.
class langchain.experimental.BabyAGI(*, memory=None, callbacks=None, callback_manager=None, ... | https://api.python.langchain.com/en/latest/modules/experimental.html |
6c0374edea1b-1 | Parameters
result (str) β
task_description (str) β
objective (str) β
Return type
List[Dict]
prioritize_tasks(this_task_id, objective)[source]ο
Prioritize tasks.
Parameters
this_task_id (int) β
objective (str) β
Return type
List[Dict]
execute_task(objective, task, k=5)[source]ο
Execute a task.
Parameters
objective ... | https://api.python.langchain.com/en/latest/modules/experimental.html |
6c0374edea1b-2 | class langchain.experimental.GenerativeAgent(*, name, age=None, traits='N/A', status, memory, llm, verbose=False, summary='', summary_refresh_seconds=3600, last_refreshed=None, daily_summaries=None)[source]ο
Bases: pydantic.main.BaseModel
A character with memory and innate characteristics.
Parameters
name (str) β
age ... | https://api.python.langchain.com/en/latest/modules/experimental.html |
6c0374edea1b-3 | The last time the characterβs summary was regenerated.
attribute daily_summaries: List[str] [Optional]ο
Summary of the events in the plan that the agent took.
model Config[source]ο
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = Trueο
summarize_related_memories(observation)[source]ο
Summ... | https://api.python.langchain.com/en/latest/modules/experimental.html |
6c0374edea1b-4 | now (Optional[datetime.datetime]) β
Return type
str
class langchain.experimental.GenerativeAgentMemory(*, llm, memory_retriever, verbose=False, reflection_threshold=None, current_plan=[], importance_weight=0.15, aggregate_importance=0.0, max_tokens_limit=1200, queries_key='queries', most_recent_memories_token_key='rec... | https://api.python.langchain.com/en/latest/modules/experimental.html |
6c0374edea1b-5 | attribute reflection_threshold: Optional[float] = Noneο
When aggregate_importance exceeds reflection_threshold, stop to reflect.
attribute current_plan: List[str] = []ο
The current plan of the agent.
attribute importance_weight: float = 0.15ο
How much weight to assign the memory importance.
attribute aggregate_importan... | https://api.python.langchain.com/en/latest/modules/experimental.html |
6c0374edea1b-6 | Parameters
inputs (Dict[str, Any]) β
outputs (Dict[str, Any]) β
Return type
None
clear()[source]ο
Clear memory contents.
Return type
None | https://api.python.langchain.com/en/latest/modules/experimental.html |
1b035ff3a02e-0 | Utilitiesο
General utilities.
class langchain.utilities.ApifyWrapper(*, apify_client=None, apify_client_async=None)[source]ο
Bases: pydantic.main.BaseModel
Wrapper around Apify.
To use, you should have the apify-client python package installed,
and the environment variable APIFY_API_TOKEN set with your API key, or pass... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-1 | Run an Actor on the Apify platform and wait for results to be ready.
Parameters
actor_id (str) β The ID or name of the Actor on the Apify platform.
run_input (Dict) β The input object of the Actor that youβre trying to run.
dataset_mapping_function (Callable) β A function that takes a single
dictionary (an Apify datase... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-2 | ARXIV_MAX_QUERY_LENGTH (int) β the cut limit on the query used for the arxiv tool.
load_max_docs (int) β a limit to the number of loaded documents
load_all_available_meta (bool) β
if True: the metadata of the loaded Documents gets all available meta info(see https://lukasschwab.me/arxiv.py/index.html#Result),
if False... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-3 | Bases: object
Executes bash commands and returns the output.
Parameters
strip_newlines (bool) β
return_err_output (bool) β
persistent (bool) β
run(commands)[source]ο
Run commands and return final output.
Parameters
commands (Union[str, List[str]]) β
Return type
str
process_output(output, command)[source]ο
Parameter... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-4 | Parameters
bing_subscription_key (str) β
bing_search_url (str) β
k (int) β
Return type
None
attribute bing_search_url: str [Required]ο
attribute bing_subscription_key: str [Required]ο
attribute k: int = 10ο
results(query, num_results)[source]ο
Run query through BingSearch and return metadata.
Parameters
query (str) ... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-5 | safesearch (str) β
time (Optional[str]) β
max_results (int) β
Return type
None
attribute k: int = 10ο
attribute max_results: int = 5ο
attribute region: Optional[str] = 'wt-wt'ο
attribute safesearch: str = 'moderate'ο
attribute time: Optional[str] = 'y'ο
get_snippets(query)[source]ο
Run query through DuckDuckGo and r... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-6 | Example
from langchain import GooglePlacesAPIWrapper
gplaceapi = GooglePlacesAPIWrapper()
Parameters
gplaces_api_key (Optional[str]) β
google_map_client (Any) β
top_k_results (Optional[int]) β
Return type
None
attribute gplaces_api_key: Optional[str] = Noneο
attribute top_k_results: Optional[int] = Noneο
fetch_place... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-7 | - Select Create credentials, then select API key from the drop-down menu.
- The API key created dialog box displays your newly created key.
- You now have an API_KEY
3. Setup Custom Search Engine so you can search the entire web
- Create a custom search engine in this link.
- In Sites to search, add any valid URL (i.e.... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-8 | Returns
snippet - The description of the result.
title - The title of the result.
link - The link to the result.
Return type
A list of dictionaries with the following keys
run(query)[source]ο
Run query through GoogleSearch and parse result.
Parameters
query (str) β
Return type
str
class langchain.utilities.GoogleSerpe... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-9 | attribute serper_api_key: Optional[str] = Noneο
attribute tbs: Optional[str] = Noneο
attribute type: Literal['news', 'search', 'places', 'images'] = 'search'ο
async aresults(query, **kwargs)[source]ο
Run query through GoogleSearch.
Parameters
query (str) β
kwargs (Any) β
Return type
Dict
async arun(query, **kwargs)[s... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-10 | class langchain.utilities.JiraAPIWrapper(*, jira=None, confluence=None, jira_username=None, jira_api_token=None, jira_instance_url=None, operations=[{'mode': 'jql', 'name': 'JQL Query', 'description': '\nΒ Β Β This tool is a wrapper around atlassian-python-api\'s Jira jql API, useful when you need to search for Jira issu... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-11 | low priority task called "test issue" with description "test description", you would pass in the following dictionary: \nΒ Β Β {{"summary": "test issue", "description": "test description", "issuetype": {{"name": "Task"}}, "priority": {{"name": "Low"}}}}\nΒ Β Β '}, {'mode': 'other', 'name': 'Catch all Jira API call', 'descr... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-12 | the DEMO space titled "This is the title" with body "This is the body. You can use \n<strong>HTML tags</strong>!", you would pass in the following dictionary: {{"space": "DEMO", "title":"This is the \ntitle","body":"This is the body. You can use <strong>HTML tags</strong>!"}} '}])[source]ο | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-13 | Bases: pydantic.main.BaseModel
Wrapper for Jira API.
Parameters
jira (Any) β
confluence (Any) β
jira_username (Optional[str]) β
jira_api_token (Optional[str]) β
jira_instance_url (Optional[str]) β
operations (List[Dict]) β
Return type
None
attribute confluence: Any = Noneο
attribute jira_api_token: Optional[str] ... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-14 | attribute operations: List[Dict] = [{'mode': 'jql', 'name': 'JQL Query', 'description': '\nΒ Β Β This tool is a wrapper around atlassian-python-api\'s Jira jql API, useful when you need to search for Jira issues.\nΒ Β Β The input to this tool is a JQL query string, and will be passed into atlassian-python-api\'s Jira `jql`... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-15 | "test issue", "description": "test description", "issuetype": {{"name": "Task"}}, "priority": {{"name": "Low"}}}}\nΒ Β Β '}, {'mode': 'other', 'name': 'Catch all Jira API call', 'description': '\nΒ Β Β This tool is a wrapper around atlassian-python-api\'s Jira API.\nΒ Β Β There are other dedicated tools for fetching all proj... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-16 | you would pass in the following dictionary: {{"space": "DEMO", "title":"This is the \ntitle","body":"This is the body. You can use <strong>HTML tags</strong>!"}} '}]ο | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-17 | issue_create(query)[source]ο
Parameters
query (str) β
Return type
str
list()[source]ο
Return type
List[Dict]
other(query)[source]ο
Parameters
query (str) β
Return type
str
page_create(query)[source]ο
Parameters
query (str) β
Return type
str
parse_issues(issues)[source]ο
Parameters
issues (Dict) β
Return type
List[d... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-18 | run(query)[source]ο
Invoke Lambda function and parse result.
Parameters
query (str) β
Return type
str
class langchain.utilities.MaxComputeAPIWrapper(client)[source]ο
Bases: object
Interface for querying Alibaba Cloud MaxCompute tables.
Parameters
client (ODPS) β
classmethod from_params(endpoint, project, *, access_id... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-19 | attribute metaphor_api_key: str [Required]ο
results(query, num_results, include_domains=None, exclude_domains=None, start_crawl_date=None, end_crawl_date=None, start_published_date=None, end_published_date=None)[source]ο
Run query through Metaphor Search and return metadata.
Parameters
query (str) β The query to search... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-20 | Bases: pydantic.main.BaseModel
Wrapper for OpenWeatherMap API using PyOWM.
Docs for using:
Go to OpenWeatherMap and sign up for an API key
Save your API KEY into OPENWEATHERMAP_API_KEY env variable
pip install pyowm
Parameters
owm (Any) β
openweathermap_api_key (Optional[str]) β
Return type
None
attribute openweather... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-21 | aiosession (Optional[aiohttp.client.ClientSession]) β
Return type
None
attribute aiosession: Optional[aiohttp.ClientSession] = Noneο
attribute credential: Optional[TokenCredential] = Noneο
attribute dataset_id: str [Required]ο
attribute group_id: Optional[str] = Noneο
attribute impersonated_user_name: Optional[str] = ... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-22 | property table_info: strο
Information about all tables in the database.
class langchain.utilities.PubMedAPIWrapper(*, top_k_results=3, load_max_docs=25, doc_content_chars_max=2000, load_all_available_meta=False, email='your_email@example.com', base_url_esearch='https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-23 | attribute load_all_available_meta: bool = Falseο
attribute load_max_docs: int = 25ο
attribute top_k_results: int = 3ο
load(query)[source]ο
Search PubMed for documents matching the query.
Return a list of dictionaries containing the document metadata.
Parameters
query (str) β
Return type
List[dict]
load_docs(query)[sou... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-24 | Wrapper for SceneXplain API.
In order to set this up, you need API key for the SceneXplain API.
You can obtain a key by following the steps below.
- Sign up for a free account at https://scenex.jina.ai/.
- Navigate to the API Access page (https://scenex.jina.ai/api)
and create a new API key.
Show JSON schema{
"title... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-25 | Fields
scenex_api_key (str)
scenex_api_url (str)
attribute scenex_api_key: str [Required]ο
attribute scenex_api_url: str = 'https://us-central1-causal-diffusion.cloudfunctions.net/describe'ο
run(image)[source]ο
Run SceneXplain image explainer.
Parameters
image (str) β
Return type
str
validator validate_environment » ... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-26 | Parameters
searx_host (str) β
unsecure (bool) β
params (dict) β
headers (Optional[dict]) β
engines (Optional[List[str]]) β
categories (Optional[List[str]]) β
query_suffix (Optional[str]) β
k (int) β
aiosession (Optional[Any]) β
Return type
None
attribute aiosession: Optional[Any] = Noneο
attribute categories: ... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-27 | Parameters
query (str) β The query to search for.
query_suffix (Optional[str]) β Extra suffix appended to the query.
num_results (int) β Limit the number of results to return.
engines (Optional[List[str]]) β List of engines to use for the query.
categories (Optional[List[str]]) β List of categories to use for the query... | https://api.python.langchain.com/en/latest/modules/utilities.html |
1b035ff3a02e-28 | searx.run("what is the weather in France ?", engine="qwant")
# the same result can be achieved using the `!` syntax of searx
# to select the engine using `query_suffix`
searx.run("what is the weather in France ?", query_suffix="!qwant")
class langchain.utilities.SerpAPIWrapper(*, search_engine=None, params={'engine': '... | https://api.python.langchain.com/en/latest/modules/utilities.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.