id stringlengths 14 16 | text stringlengths 4 1.28k | source stringlengths 54 121 |
|---|---|---|
c286b9a2e162-93 | Parameters
zip_path (str) β
workspace_url (Optional[str]) β
load()[source]ο
Load and return documents from the Slack directory dump.
Return type
List[langchain.schema.Document]
class langchain.document_loaders.SnowflakeLoader(query, user, password, account, warehouse, role, database, schema, parameters=None, page_con... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-94 | password (str) β
account (str) β
warehouse (str) β
role (str) β
database (str) β
schema (str) β
parameters (Optional[Dict[str, Any]]) β
page_content_columns (Optional[List[str]]) β
metadata_columns (Optional[List[str]]) β
lazy_load()[source]ο
A lazy loader for document content.
Return type
Iterator[langchain.s... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-95 | None
load()[source]ο
Load data into document objects.
Return type
List[langchain.schema.Document]
class langchain.document_loaders.StripeLoader(resource, access_token=None)[source]ο
Bases: langchain.document_loaders.base.BaseLoader
Loader that fetches data from Stripe.
Parameters
resource (str) β
access_token (Optiona... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-96 | api_id (Optional[int]) β
api_hash (Optional[str]) β
username (Optional[str]) β
file_path (str) β
async fetch_data_from_telegram()[source]ο
Fetch data from Telegram API and save it as a JSON file.
Return type
None
load()[source]ο
Load documents.
Return type
List[langchain.schema.Document]
class langchain.document_lo... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-97 | class langchain.document_loaders.TextLoader(file_path, encoding=None, autodetect_encoding=False)[source]ο
Bases: langchain.document_loaders.base.BaseLoader
Load text files.
Parameters
file_path (str) β Path to the file to load.
encoding (Optional[str]) β File encoding to use. If None, the file will be loaded
encoding. ... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-98 | api_key (str) β
lazy_load()[source]ο
Lazily load the file.
Return type
Iterator[langchain.schema.Document]
load()[source]ο
Load file.
Return type
List[langchain.schema.Document]
class langchain.document_loaders.TomlLoader(source)[source]ο
Bases: langchain.document_loaders.base.BaseLoader
A TOML document loader that in... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-99 | Iterator[langchain.schema.Document]
class langchain.document_loaders.TrelloLoader(client, board_name, *, include_card_name=True, include_comments=True, include_checklist=True, card_filter='all', extra_metadata=('due_date', 'labels', 'list', 'closed'))[source]ο
Bases: langchain.document_loaders.base.BaseLoader
Trello lo... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-100 | Parameters
board_name (str) β The name of the Trello board.
api_key (Optional[str]) β Trello API key. Can also be specified as environment variable
TRELLO_API_KEY.
token (Optional[str]) β Trello token. Can also be specified as environment variable
TRELLO_TOKEN.
include_card_name β Whether to include the name of the car... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-101 | load()[source]ο
Loads all cards from the specified Trello board.
You can filter the cards, metadata and text included by using the optional
parameters.
Returns:A list of documents, one for each card in the board.
Return type
List[langchain.schema.Document]
class langchain.document_loaders.TwitterTweetLoader(auth_handle... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-102 | number_tweets (Optional[int]) β
load()[source]ο
Load tweets.
Return type
List[langchain.schema.Document]
classmethod from_bearer_token(oauth2_bearer_token, twitter_users, number_tweets=100)[source]ο
Create a TwitterTweetLoader from OAuth2 bearer token.
Parameters
oauth2_bearer_token (str) β
twitter_users (Sequence[st... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-103 | twitter_users (Sequence[str]) β
number_tweets (Optional[int]) β
Return type
langchain.document_loaders.twitter.TwitterTweetLoader
class langchain.document_loaders.UnstructuredAPIFileIOLoader(file, mode='single', url='https://api.unstructured.io/general/v0/general', api_key='', **unstructured_kwargs)[source]ο
Bases: l... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-104 | Bases: langchain.document_loaders.unstructured.UnstructuredFileLoader
Loader that uses the unstructured web API to load files.
Parameters
file_path (Union[str, List[str]]) β
mode (str) β
url (str) β
api_key (str) β
unstructured_kwargs (Any) β
class langchain.document_loaders.UnstructuredCSVLoader(file_path, mode='... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-105 | Loader that uses unstructured to load epub files.
Parameters
file_path (Union[str, List[str]]) β
mode (str) β
unstructured_kwargs (Any) β
class langchain.document_loaders.UnstructuredEmailLoader(file_path, mode='single', **unstructured_kwargs)[source]ο
Bases: langchain.document_loaders.unstructured.UnstructuredFileL... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-106 | mode (str) β
unstructured_kwargs (Any) β
class langchain.document_loaders.UnstructuredFileIOLoader(file, mode='single', **unstructured_kwargs)[source]ο
Bases: langchain.document_loaders.unstructured.UnstructuredBaseLoader
Loader that uses unstructured to load file IO objects.
Parameters
file (Union[IO, Sequence[IO]])... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-107 | unstructured_kwargs (Any) β
class langchain.document_loaders.UnstructuredHTMLLoader(file_path, mode='single', **unstructured_kwargs)[source]ο
Bases: langchain.document_loaders.unstructured.UnstructuredFileLoader
Loader that uses unstructured to load HTML files.
Parameters
file_path (Union[str, List[str]]) β
mode (str... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-108 | unstructured_kwargs (Any) β
class langchain.document_loaders.UnstructuredMarkdownLoader(file_path, mode='single', **unstructured_kwargs)[source]ο
Bases: langchain.document_loaders.unstructured.UnstructuredFileLoader
Loader that uses unstructured to load markdown files.
Parameters
file_path (Union[str, List[str]]) β
m... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-109 | 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]]) β
mode (str) ... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-110 | unstructured_kwargs (Any) β
class langchain.document_loaders.UnstructuredRSTLoader(file_path, mode='single', **unstructured_kwargs)[source]ο
Bases: langchain.document_loaders.unstructured.UnstructuredFileLoader
Loader that uses unstructured to load RST files.
Parameters
file_path (str) β
mode (str) β
unstructured_kw... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-111 | unstructured_kwargs (Any) β
class langchain.document_loaders.UnstructuredURLLoader(urls, continue_on_failure=True, mode='single', show_progress_bar=False, **unstructured_kwargs)[source]ο
Bases: langchain.document_loaders.base.BaseLoader
Loader that uses unstructured to load HTML files.
Parameters
urls (List[str]) β
c... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-112 | Parameters
file_path (Union[str, List[str]]) β
mode (str) β
unstructured_kwargs (Any) β
class langchain.document_loaders.UnstructuredXMLLoader(file_path, mode='single', **unstructured_kwargs)[source]ο
Bases: langchain.document_loaders.unstructured.UnstructuredFileLoader
Loader that uses unstructured to load XML file... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-113 | places (Sequence[str]) β
Return type
None
classmethod from_params(places, *, openweathermap_api_key=None)[source]ο
Parameters
places (Sequence[str]) β
openweathermap_api_key (Optional[str]) β
Return type
langchain.document_loaders.weather.WeatherDataLoader
lazy_load()[source]ο
Lazily load weather data for the given ... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-114 | header_template (Optional[dict]) β
verify (Optional[bool]) β
requests_per_second: int = 2ο
Max number of concurrent requests to make.
default_parser: str = 'html.parser'ο
Default parser to use for BeautifulSoup.
requests_kwargs: Dict[str, Any] = {}ο
kwargs for requests
bs_get_text_kwargs: Dict[str, Any] = {}ο
kwargs ... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-115 | Return type
List[Any]
scrape(parser=None)[source]ο
Scrape data from webpage and return it in BeautifulSoup format.
Parameters
parser (Optional[str]) β
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(... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-116 | Load documents.
Return type
List[langchain.schema.Document]
class langchain.document_loaders.WikipediaLoader(query, lang='en', load_max_docs=100, load_all_available_meta=False, doc_content_chars_max=4000)[source]ο
Bases: langchain.document_loaders.base.BaseLoader
Loads a query result from www.wikipedia.org into a list ... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-117 | Return type
List[Document]
class langchain.document_loaders.YoutubeAudioLoader(urls, save_dir)[source]ο
Bases: langchain.document_loaders.blob_loaders.schema.BlobLoader
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... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
c286b9a2e162-118 | translation (str) β
continue_on_failure (bool) β
static extract_video_id(youtube_url)[source]ο
Extract video id from common YT urls.
Parameters
youtube_url (str) β
Return type
str
classmethod from_youtube_url(youtube_url, **kwargs)[source]ο
Given youtube URL, load video.
Parameters
youtube_url (str) β
kwargs (Any) ... | https://api.python.langchain.com/en/latest/modules/document_loaders.html |
06396a7fd3e3-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 |
06396a7fd3e3-1 | verbose (bool) β
tags (Optional[List[str]]) β
task_list (collections.deque) β
task_creation_chain (langchain.chains.base.Chain) β
task_prioritization_chain (langchain.chains.base.Chain) β
execution_chain (langchain.chains.base.Chain) β
task_id_counter (int) β
vectorstore (langchain.vectorstores.base.VectorStore)... | https://api.python.langchain.com/en/latest/modules/experimental.html |
06396a7fd3e3-2 | 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 |
06396a7fd3e3-3 | verbose (bool) β
task_execution_chain (Optional[langchain.chains.base.Chain]) β
kwargs (Dict[str, Any]) β
Return type
langchain.experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI
class langchain.experimental.AutoGPT(ai_name, memory, chain, output_parser, tools, feedback_tool=None, chat_history_memory=None)[sou... | https://api.python.langchain.com/en/latest/modules/experimental.html |
06396a7fd3e3-4 | Generative agentsο
Here, we document the GenerativeAgent and GenerativeAgentMemory classes from the langchain.experimental module.
class langchain.experimental.GenerativeAgent(*, name, age=None, traits='N/A', status, memory, llm, verbose=False, summary='', summary_refresh_seconds=3600, last_refreshed=None, daily_summar... | https://api.python.langchain.com/en/latest/modules/experimental.html |
06396a7fd3e3-5 | last_refreshed (datetime.datetime) β
daily_summaries (List[str]) β
Return type
None
attribute name: str [Required]ο
The characterβs name.
attribute age: Optional[int] = Noneο
The optional age of the character.
attribute traits: str = 'N/A'ο
Permanent traits to ascribe to the character.
attribute status: str [Required... | https://api.python.langchain.com/en/latest/modules/experimental.html |
06396a7fd3e3-6 | How frequently to re-generate the summary.
attribute last_refreshed: datetime.datetime [Optional]ο
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 pyd... | https://api.python.langchain.com/en/latest/modules/experimental.html |
06396a7fd3e3-7 | React to a given observation.
Parameters
observation (str) β
now (Optional[datetime.datetime]) β
Return type
Tuple[bool, str]
get_summary(force_refresh=False, now=None)[source]ο
Return a descriptive summary of the agent.
Parameters
force_refresh (bool) β
now (Optional[datetime.datetime]) β
Return type
str
get_full_... | https://api.python.langchain.com/en/latest/modules/experimental.html |
06396a7fd3e3-8 | 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='recent_memories_token', add_memory_key='... | https://api.python.langchain.com/en/latest/modules/experimental.html |
06396a7fd3e3-9 | reflection_threshold (Optional[float]) β
current_plan (List[str]) β
importance_weight (float) β
aggregate_importance (float) β
max_tokens_limit (int) β
queries_key (str) β
most_recent_memories_token_key (str) β
add_memory_key (str) β
relevant_memories_key (str) β
relevant_memories_simple_key (str) β
most_rece... | https://api.python.langchain.com/en/latest/modules/experimental.html |
06396a7fd3e3-10 | The retriever to fetch related memories.
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... | https://api.python.langchain.com/en/latest/modules/experimental.html |
06396a7fd3e3-11 | Parameters
memory_content (str) β
now (Optional[datetime.datetime]) β
Return type
List[str]
add_memory(memory_content, now=None)[source]ο
Add an observation or memory to the agentβs memory.
Parameters
memory_content (str) β
now (Optional[datetime.datetime]) β
Return type
List[str]
fetch_memories(observation, now=No... | https://api.python.langchain.com/en/latest/modules/experimental.html |
06396a7fd3e3-12 | Return type
Dict[str, str]
save_context(inputs, outputs)[source]ο
Save the context of this model run to memory.
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 |
4212bb82ae73-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 |
4212bb82ae73-1 | 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 dataset item) and converts it to
an instance of the Document class.
build (... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-2 | Return type
ApifyDatasetLoader
call_actor(actor_id, run_input, dataset_mapping_function, *, build=None, memory_mbytes=None, timeout_secs=None)[source]ο
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) β T... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-3 | Returns
A loader that will fetch the records from theActor runβs default dataset.
Return type
ApifyDatasetLoader
class langchain.utilities.ArxivAPIWrapper(*, arxiv_search=None, arxiv_exceptions=None, top_k_results=3, load_max_docs=100, load_all_available_meta=False, doc_content_chars_max=4000, ARXIV_MAX_QUERY_LENGTH=30... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-4 | Parameters
top_k_results (int) β number of the top-scored document used for the arxiv tool
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 ge... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-5 | attribute load_max_docs: int = 100ο
attribute top_k_results: int = 3ο
load(query)[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
Parameters
query (str)... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-6 | Return type
str
class langchain.utilities.BashProcess(strip_newlines=False, return_err_output=False, persistent=False)[source]ο
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... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-7 | This wrapper will use bibtexparser to load a collection of references from
a bibtex file and fetch document summaries.
Return type
None
get_metadata(entry, load_extra=False)[source]ο
Get metadata for the given entry.
Parameters
entry (Mapping[str, Any]) β
load_extra (bool) β
Return type
Dict[str, Any]
load_bibtex_ent... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-8 | https://levelup.gitconnected.com/api-tutorial-how-to-use-bing-web-search-api-in-python-4165d5592a7e
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(qu... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-9 | run(query)[source]ο
Run query through BingSearch and parse result.
Parameters
query (str) β
Return type
str
class langchain.utilities.BraveSearchWrapper(*, api_key, search_kwargs=None)[source]ο
Bases: pydantic.main.BaseModel
Parameters
api_key (str) β
search_kwargs (dict) β
Return type
None
attribute api_key: str [R... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-10 | Wrapper for DuckDuckGo Search API.
Free and does not require any setup
Parameters
k (int) β
region (Optional[str]) β
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:... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-11 | Parameters
query (str) β The query to search for.
num_results (int) β The number of results to return.
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]ο
Parameters
query (str) β ... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-12 | as a named parameter to the constructor.
By default, this will return the all the results on the input query.You can use the top_k_results argument to limit the number of results.
Example
from langchain import GooglePlacesAPIWrapper
gplaceapi = GooglePlacesAPIWrapper()
Parameters
gplaces_api_key (Optional[str]) β
goog... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-13 | run(query)[source]ο
Run Places search and get k number of places that exists that match.
Parameters
query (str) β
Return type
str
class langchain.utilities.GoogleSearchAPIWrapper(*, search_engine=None, google_api_key=None, google_cse_id=None, k=10, siterestrict=False)[source]ο
Bases: pydantic.main.BaseModel
Wrapper fo... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-14 | The current version of the library is 2.70.0 at this time
2. To create an API key:
- Navigate to the APIs & ServicesβCredentials panel in Cloud Console.
- 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... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-15 | 4. Enable the Custom Search API
- Navigate to the APIs & ServicesβDashboard panel in Cloud Console.
- Click Enable APIs and Services.
- Search for Custom Search API and click on it.
- Click Enable.
URL for it: https://console.cloud.google.com/apis/library/customsearch.googleapis
.com
Parameters
search_engine (Any) β
g... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-16 | Parameters
query (str) β The query to search for.
num_results (int) β The number of results to return.
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 GoogleS... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-17 | You can create a free API key at https://serper.dev.
To use, you should have the environment variable SERPER_API_KEY
set with your API key, or pass serper_api_key as a named parameter
to the constructor.
Example
from langchain import GoogleSerperAPIWrapper
google_serper = GoogleSerperAPIWrapper()
Parameters
k (int) β
... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-18 | attribute hl: str = 'en'ο
attribute k: int = 10ο
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) ... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-19 | Return type
Dict
run(query, **kwargs)[source]ο
Run query through GoogleSearch and parse result.
Parameters
query (str) β
kwargs (Any) β
Return type
str
class langchain.utilities.GraphQLAPIWrapper(*, custom_headers=None, graphql_endpoint, gql_client=None, gql_function)[source]ο
Bases: pydantic.main.BaseModel
Wrapper a... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-20 | run(query)[source]ο
Run a GraphQL query and get the results.
Parameters
query (str) β
Return type
str | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-21 | 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 |
4212bb82ae73-22 | '}, {'mode': 'get_projects', 'name': 'Get Projects', 'description': "\nΒ Β Β This tool is a wrapper around atlassian-python-api's Jira project API, \nΒ Β Β useful when you need to fetch all the projects the user has access to, find out how many projects there are, or as an intermediary step that involv searching by project... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-23 | 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', 'description': '\nΒ ... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-24 | you would pass in the following string:\nΒ Β Β self.jira.update_issue_field(key, {{"summary": "New summary"}})\nΒ Β Β or to find out how many projects are in the Jira instance, you would pass in the following string:\nΒ Β Β self.jira.projects()\nΒ Β Β For more information on the Jira API, refer to https://atlassian-python-api.... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-25 | 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 |
4212bb82ae73-26 | 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 |
4212bb82ae73-27 | 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 |
4212bb82ae73-28 | wrapper around atlassian-python-api's Jira project API, \nΒ Β Β useful when you need to fetch all the projects the user has access to, find out how many projects there are, or as an intermediary step that involv searching by projects. \nΒ Β Β there is no input to this tool.\nΒ Β Β "}, {'mode': 'create_issue', 'name': 'Create... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-29 | "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 |
4212bb82ae73-30 | or to find out how many projects are in the Jira instance, you would pass in the following string:\nΒ Β Β self.jira.projects()\nΒ Β Β For more information on the Jira API, refer to https://atlassian-python-api.readthedocs.io/jira.html\nΒ Β Β '}, {'mode': 'create_page', 'name': 'Create confluence page', 'description': 'This t... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-31 | 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 |
4212bb82ae73-32 | 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 |
4212bb82ae73-33 | Parameters
query (str) β
Return type
str
class langchain.utilities.LambdaWrapper(*, lambda_client=None, function_name=None, awslambda_tool_name=None, awslambda_tool_description=None)[source]ο
Bases: pydantic.main.BaseModel
Wrapper for AWS Lambda SDK.
Docs for using:
pip install boto3
Create a lambda function using the... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-34 | 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 |
4212bb82ae73-35 | directly or set as the environment variable
MAX_COMPUTE_SECRET_ACCESS_KEY.
Return type
langchain.utilities.max_compute.MaxComputeAPIWrapper
lazy_query(query)[source]ο
Parameters
query (str) β
Return type
Iterator[dict]
query(query)[source]ο
Parameters
query (str) β
Return type
List[dict]
class langchain.utilities.Met... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-36 | 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 for.
num_results (int) β The number of resu... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-37 | Return type
A list of dictionaries with the following keys
async results_async(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]ο
Get results from the Metaphor Search API asynchronously.
Parameters
quer... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-38 | 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 |
4212bb82ae73-39 | Bases: pydantic.main.BaseModel
Create PowerBI engine from dataset ID and credential or token.
Use either the credential or a supplied token to authenticate.
If both are supplied the credential is used to generate a token.
The impersonated_user_name is the UPN of a user to be impersonated.
If the model is not RLS enable... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-40 | 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] = Noneο
attribute sample_rows_in_table_info: int = 1ο
Con... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-41 | async arun(command)[source]ο
Execute a DAX command and return the result asynchronously.
Parameters
command (str) β
Return type
Any
get_schemas()[source]ο
Get the available schemaβs.
Return type
str
get_table_info(table_names=None)[source]ο
Get information about specified tables.
Parameters
table_names (Optional[Union... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-42 | 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 |
4212bb82ae73-43 | Parameters
top_k_results (int) β number of the top-scored document used for the PubMed 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://www.ncbi.nlm.nih.gov/books/NBK25499/#chapte... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-44 | 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 |
4212bb82ae73-45 | Parameters
query (str) β
Return type
str
class langchain.utilities.PythonREPL(*, _globals=None, _locals=None)[source]ο
Bases: pydantic.main.BaseModel
Simulates a standalone Python REPL.
Parameters
_globals (Optional[Dict]) β
_locals (Optional[Dict]) β
Return type
None
attribute globals: Optional[Dict] [Optional] (al... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-46 | 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 |
4212bb82ae73-47 | "type": "object",
"properties": {
"scenex_api_key": {
"title": "Scenex Api Key",
"env": "SCENEX_API_KEY",
"env_names": "{'scenex_api_key'}",
"type": "string"
},
"scenex_api_url": {
"title": "Scenex Api Url",
"default": "https://us-central1-causa... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-48 | 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 » all fields[source]ο
Validat... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-49 | searx_host or exporting the environment variable SEARX_HOST.
In some situations you might want to disable SSL verification, for example
if you are running searx locally. You can do this by passing the named parameter
unsecure. You can also pass the host url scheme as http to disable SSL.
Example
from langchain.utilitie... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-50 | 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: Optional[List[str]] = []ο
attribute engines: Optio... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-51 | Asynchronously query with json results.
Uses aiohttp. See results for more info.
Parameters
query (str) β
num_results (int) β
engines (Optional[List[str]]) β
query_suffix (Optional[str]) β
kwargs (Any) β
Return type
List[Dict]
async arun(query, engines=None, query_suffix='', **kwargs)[source]ο
Asynchronously versi... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-52 | 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.
**kwargs β extra parameters to pass to the searx... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-53 | Parameters
query (str) β The query to search for.
query_suffix (Optional[str]) β Extra suffix appended to the query.
engines (Optional[List[str]]) β List of engines to use for the query.
categories (Optional[List[str]]) β List of categories to use for the query.
**kwargs β extra parameters to pass to the searx API.
kwa... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-54 | # 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': 'google', 'gl': 'us', 'google_domain': 'google.com', 'hl': 'en'}, serpapi_api_key=None, aiosession=None)[source]ο
Bases: pydan... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-55 | params (dict) β
serpapi_api_key (Optional[str]) β
aiosession (Optional[aiohttp.client.ClientSession]) β
Return type
None
attribute aiosession: Optional[aiohttp.client.ClientSession] = Noneο
attribute params: dict = {'engine': 'google', 'gl': 'us', 'google_domain': 'google.com', 'hl': 'en'}ο
attribute serpapi_api_key... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-56 | Return type
str
get_params(query)[source]ο
Get parameters for SerpAPI.
Parameters
query (str) β
Return type
Dict[str, str]
results(query)[source]ο
Run query through SerpAPI and return the raw result.
Parameters
query (str) β
Return type
dict
run(query, **kwargs)[source]ο
Run query through SerpAPI and parse result.
Pa... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-57 | schema (Optional[str]) β
ignore_tables (Optional[List[str]]) β
include_tables (Optional[List[str]]) β
sample_rows_in_table_info (int) β
classmethod from_uri(database_uri, engine_args=None, **kwargs)[source]ο
Creating a remote Spark Session via Spark connect.
For example: SparkSQL.from_uri(βsc://localhost:15002β)
Pa... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-58 | Parameters
command (str) β
fetch (str) β
Return type
str
get_table_info_no_throw(table_names=None)[source]ο
Get information about specified tables.
Follows best practices as specified in: Rajkumar et al, 2022
(https://arxiv.org/abs/2204.00498)
If sample_rows_in_table_info, the specified number of sample rows will be
... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-59 | If the statement throws an error, the error message is returned.
Parameters
command (str) β
fetch (str) β
Return type
str
class langchain.utilities.TextRequestsWrapper(*, headers=None, aiosession=None)[source]ο
Bases: pydantic.main.BaseModel
Lightweight wrapper around requests library.
The main purpose of this wrappe... | https://api.python.langchain.com/en/latest/modules/utilities.html |
4212bb82ae73-60 | kwargs (Any) β
Return type
str
async aget(url, **kwargs)[source]ο
GET the URL and return the text asynchronously.
Parameters
url (str) β
kwargs (Any) β
Return type
str
async apatch(url, data, **kwargs)[source]ο
PATCH the URL and return the text asynchronously.
Parameters
url (str) β
data (Dict[str, Any]) β
kwargs ... | 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.