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