id
stringlengths
14
15
text
stringlengths
17
2.72k
source
stringlengths
47
115
4bf4e892bacb-6
> Finished chain. Observation: Some basic advice for improving communication skills would be to make sure to listen. Thought:I am finished executing the plan and have the information the user asked for. Final Answer: A short piece of advice for improving communication skills is to make sure to listen. > Finished chai...
https://python.langchain.com/docs/integrations/toolkits/openapi
4bf4e892bacb-7
> Finished chain. Observation: The base url for the API is https://api.openai.com/v1 Thought: I should find the path for the /completions endpoint. Action: json_explorer Action Input: What is the path for the /completions endpoint? > Entering new AgentExecutor chain... Action: json_spec_list_keys Action Input: data O...
https://python.langchain.com/docs/integrations/toolkits/openapi
4bf4e892bacb-8
> Entering new AgentExecutor chain... Action: json_spec_list_keys Action Input: data Observation: ['openapi', 'info', 'servers', 'tags', 'paths', 'components', 'x-oaiMeta'] Thought: I should look at the paths key to see what endpoints exist Action: json_spec_list_keys Action Input: data["paths"] Observation: ['/engines...
https://python.langchain.com/docs/integrations/toolkits/openapi
4bf4e892bacb-9
Observation: ['schema'] Thought: I should look at the schema key to see what parameters are required Action: json_spec_list_keys Action Input: data["paths"]["/completions"]["post"]["requestBody"]["content"]["application/json"]["schema"] Observation: ['$ref'] Thought: I should look at the $ref key to see what parameters...
https://python.langchain.com/docs/integrations/toolkits/openapi
4bf4e892bacb-10
> Finished chain. Observation: The required parameters for a POST request to the /completions endpoint are 'model'. Thought: I now know the parameters needed to make the request. Action: requests_post Action Input: { "url": "https://api.openai.com/v1/completions", "data": { "model": "davinci", "prompt": "tell me a jok...
https://python.langchain.com/docs/integrations/toolkits/openapi
460b8e35d6d0-0
Pandas Dataframe This notebook shows how to use agents to interact with a Pandas DataFrame. It is mostly optimized for question answering. NOTE: this agent calls the Python agent under the hood, which executes LLM generated Python code - this can be bad if the LLM generated Python code is harmful. Use cautiously. from ...
https://python.langchain.com/docs/integrations/toolkits/pandas
460b8e35d6d0-1
> Entering new AgentExecutor chain... Thought: I need to calculate the average age first Action: python_repl_ast Action Input: df['Age'].mean() Observation: 29.69911764705882 Thought: I now need to calculate the square root of the average age Action: python_repl_ast Action Input: math.sqrt(df['Age'].mean()) Observation...
https://python.langchain.com/docs/integrations/toolkits/pandas
31dbda54a9f3-0
This toolkit is used to interact with the browser. While other tools (like the Requests tools) are fine for static sites, PlayWright Browser toolkits let your agent navigate the web and interact with dynamically rendered sites. [ClickTool(name='click_element', description='Click on an element with the given CSS select...
https://python.langchain.com/docs/integrations/toolkits/playwright
31dbda54a9f3-1
ExtractHyperlinksTool(name='extract_hyperlinks', description='Extract all hyperlinks on the current webpage', args_schema=<class 'langchain.tools.playwright.extract_hyperlinks.ExtractHyperlinksToolInput'>, return_direct=False, verbose=False, callbacks=None, callback_manager=None, sync_browser=None, async_browser=<Brows...
https://python.langchain.com/docs/integrations/toolkits/playwright
31dbda54a9f3-2
'[{"innerText": "These Ukrainian veterinarians are risking their lives to care for dogs and cats in the war zone"}, {"innerText": "Life in the ocean\\u2019s \\u2018twilight zone\\u2019 could disappear due to the climate crisis"}, {"innerText": "Clashes renew in West Darfur as food and water shortages worsen in Sudan vi...
https://python.langchain.com/docs/integrations/toolkits/playwright
31dbda54a9f3-3
to have sparked deadly Madrid restaurant fire"}, {"innerText": "Another bomb found in Belgorod just days after Russia accidentally struck the city"}, {"innerText": "A Black teen\\u2019s murder sparked a crisis over racism in British policing. Thirty years on, little has changed"}, {"innerText": "Belgium destroys shipme...
https://python.langchain.com/docs/integrations/toolkits/playwright
31dbda54a9f3-4
accidentally created Facebook post questioning Brazil election results, say his attorneys"}, {"innerText": "Crowd kills over a dozen suspected gang members in Haiti"}, {"innerText": "Thousands of tequila bottles containing liquid meth seized"}, {"innerText": "Why send a US stealth submarine to South Korea \\u2013 and t...
https://python.langchain.com/docs/integrations/toolkits/playwright
31dbda54a9f3-5
most populated"}, {"innerText": "April 27, 2023 - Russia-Ukraine news"}, {"innerText": "\\u2018Often they shoot at each other\\u2019: Ukrainian drone operator details chaos in Russian ranks"}, {"innerText": "Hear from family members of Americans stuck in Sudan frustrated with US response"}, {"innerText": "U.S. talk sho...
https://python.langchain.com/docs/integrations/toolkits/playwright
31dbda54a9f3-6
message for Autism Awareness Month"}, {"innerText": "CNN Hero of the Year Nelly Cheboi returned to Kenya with plans to lift more students out of poverty"}]'
https://python.langchain.com/docs/integrations/toolkits/playwright
31dbda54a9f3-7
Several of the browser tools are StructuredTool's, meaning they expect multiple arguments. These aren't compatible (out of the box) with agents older than the STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION from langchain.agents import initialize_agent, AgentType from langchain.chat_models import ChatAnthropic
https://python.langchain.com/docs/integrations/toolkits/playwright
31dbda54a9f3-8
llm = ChatAnthropic(temperature=0) # or any other LLM, e.g., ChatOpenAI(), OpenAI() agent_chain = initialize_agent( tools, llm, agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION, verbose=True, )
https://python.langchain.com/docs/integrations/toolkits/playwright
e0c06f26f562-0
This notebook showcases an agent interacting with a Power BI Dataset. The agent is answering more general questions about a dataset, as well as recover from errors. Note that, as this agent is in active development, all answers might not be correct. It runs against the executequery endpoint, which does not allow delete...
https://python.langchain.com/docs/integrations/toolkits/powerbi
6e2660f52980-0
This notebook showcases an agent designed to write and execute Python code to answer a question. This shows how to initialize the agent using the ZERO_SHOT_REACT_DESCRIPTION agent type. This shows how to initialize the agent using the OPENAI_FUNCTIONS agent type. Note that this is an alternative to the above. agent_exe...
https://python.langchain.com/docs/integrations/toolkits/python
6e2660f52980-1
> Entering new chain... Could not parse tool input: {'name': 'python', 'arguments': 'import torch\nimport torch.nn as nn\nimport torch.optim as optim\n\n# Define the neural network\nclass SingleNeuron(nn.Module):\n def __init__(self):\n super(SingleNeuron, self).__init__()\n self.linear = nn.Linear(1, 1)\n \n def forwa...
https://python.langchain.com/docs/integrations/toolkits/python
6e2660f52980-2
def forward(self, x): return self.linear(x) # Create the synthetic data x_train = torch.tensor([[1.0], [2.0], [3.0], [4.0]], dtype=torch.float32) y_train = torch.tensor([[2.0], [4.0], [6.0], [8.0]], dtype=torch.float32) # Create the neural network model = SingleNeuron() # Define the loss function and optimizer crite...
https://python.langchain.com/docs/integrations/toolkits/python
40144eca471f-0
This notebook shows how to use agents to interact with a Spark DataFrame and Spark Connect. It is mostly optimized for question answering. NOTE: this agent calls the Python agent under the hood, which executes LLM generated Python code - this can be bad if the LLM generated Python code is harmful. Use cautiously. 23/05...
https://python.langchain.com/docs/integrations/toolkits/spark
40144eca471f-1
+-----------+--------+------+--------------------+------+----+-----+-----+----------------+-------+-----+--------+ |PassengerId|Survived|Pclass| Name| Sex| Age|SibSp|Parch| Ticket| Fare|Cabin|Embarked| +-----------+--------+------+--------------------+------+----+-----+-----+----------------+-------+-----+--------+ | 1...
https://python.langchain.com/docs/integrations/toolkits/spark
40144eca471f-2
| 10| 1| 2|Nasser, Mrs. Nich...|female|14.0| 1| 0| 237736|30.0708| null| C| | 11| 1| 3|Sandstrom, Miss. ...|female| 4.0| 1| 1| PP 9549| 16.7| G6| S| | 12| 1| 1|Bonnell, Miss. El...|female|58.0| 0| 0| 113783| 26.55| C103| S| | 13| 0| 3|Saundercock, Mr. ...| male|20.0| 0| 0| A/5. 2151| 8.05| null| S| | 14| 0| 3|Andersson...
https://python.langchain.com/docs/integrations/toolkits/spark
40144eca471f-3
+-----------+--------+------+--------------------+------+----+-----+-----+----------------+-------+-----+--------+ only showing top 20 rows
https://python.langchain.com/docs/integrations/toolkits/spark
683e9e2d25de-0
Vectorstore This notebook showcases an agent designed to retrieve information from one or more vectorstores, either with or without sources. Create Vectorstores​ from langchain.embeddings.openai import OpenAIEmbeddings from langchain.vectorstores import Chroma from langchain.text_splitter import CharacterTextSplitter f...
https://python.langchain.com/docs/integrations/toolkits/vectorstore
683e9e2d25de-1
> Entering new AgentExecutor chain... I need to find the answer in the state of the union address Action: state_of_union_address Action Input: What did biden say about ketanji brown jackson Observation: Biden said that Ketanji Brown Jackson is one of the nation's top legal minds and that she will continue Justice Breye...
https://python.langchain.com/docs/integrations/toolkits/vectorstore
683e9e2d25de-2
> Finished chain. "Biden said that he nominated Circuit Court of Appeals Judge Ketanji Brown Jackson to the United States Supreme Court, and that she is one of the nation's top legal minds who will continue Justice Breyer's legacy of excellence. Sources: ../../state_of_the_union.txt" Multiple Vectorstores​ We can ...
https://python.langchain.com/docs/integrations/toolkits/vectorstore
683e9e2d25de-3
> Entering new AgentExecutor chain... I need to find out what tool ruff uses to run over Jupyter Notebooks Action: ruff Action Input: What tool does ruff use to run over Jupyter Notebooks? Observation: Ruff is integrated into nbQA, a tool for running linters and code formatters over Jupyter Notebooks. After installing ...
https://python.langchain.com/docs/integrations/toolkits/vectorstore
78c68b42b7e1-0
This notebook shows how to use agents to interact with Spark SQL. Similar to SQL Database Agent, it is designed to address general inquiries about Spark SQL and facilitate error recovery. NOTE: Note that, as this agent is in active development, all answers might not be correct. Additionally, it is not guaranteed that t...
https://python.langchain.com/docs/integrations/toolkits/spark_sql
78c68b42b7e1-1
/* 3 rows from titanic table: PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked 1 0 3 Braund, Mr. Owen Harris male 22.0 1 0 A/5 21171 7.25 None S 2 1 1 Cumings, Mrs. John Bradley (Florence Briggs Thayer) female 38.0 1 0 PC 17599 71.2833 C85 C 3 1 3 Heikkinen, Miss. Laina female 26.0 0 0 ST...
https://python.langchain.com/docs/integrations/toolkits/spark_sql
78c68b42b7e1-2
> Finished chain. 'The titanic table has the following columns: PassengerId (INT), Survived (INT), Pclass (INT), Name (STRING), Sex (STRING), Age (DOUBLE), SibSp (INT), Parch (INT), Ticket (STRING), Fare (DOUBLE), Cabin (STRING), and Embarked (STRING). Here are some sample rows from the table: \n\n1. PassengerId: ...
https://python.langchain.com/docs/integrations/toolkits/spark_sql
bec26ae393e2-0
SQL Database This notebook showcases an agent designed to interact with a SQL databases. The agent builds off of SQLDatabaseChain and is designed to answer more general questions about a database, as well as recover from errors. Note that, as this agent is in active development, all answers might not be correct. Additi...
https://python.langchain.com/docs/integrations/toolkits/sql_database
bec26ae393e2-1
SELECT * FROM "public"."users" JOIN "public"."user_permissions" ON "public"."users".id = "public"."user_permissions".user_id JOIN "public"."projects" ON "public"."users".id = "public"."projects".user_id JOIN "public"."events" ON "public"."projects".id = "public"."events".project_id; For a transactional SQL database, if...
https://python.langchain.com/docs/integrations/toolkits/sql_database
bec26ae393e2-2
> Entering new chain... Invoking: `list_tables_sql_db` with `{}` Album, Artist, Track, PlaylistTrack, InvoiceLine, sales_table, Playlist, Genre, Employee, Customer, Invoice, MediaType Invoking: `schema_sql_db` with `PlaylistTrack` CREATE TABLE "PlaylistTrack" ( "PlaylistId" INTEGER NOT NULL, "TrackId" INTEGER NO...
https://python.langchain.com/docs/integrations/toolkits/sql_database
bec26ae393e2-3
> Finished chain. 'The `PlaylistTrack` table has two columns: `PlaylistId` and `TrackId`. It is a junction table that represents the relationship between playlists and tracks. \n\nHere is the schema of the `PlaylistTrack` table:\n\n```\nCREATE TABLE "PlaylistTrack" (\n\t"PlaylistId" INTEGER NOT NULL, \n\t"TrackId"...
https://python.langchain.com/docs/integrations/toolkits/sql_database
bec26ae393e2-4
SELECT * FROM 'PlaylistTrack' LIMIT 3; PlaylistId TrackId 1 3402 1 3389 1 3390 Thought: I now know the final answer Final Answer: The PlaylistTrack table contains two columns, PlaylistId and TrackId, which are both integers and are used to link Playlist and Track tables. > Finished chain. 'The PlaylistTrack table...
https://python.langchain.com/docs/integrations/toolkits/sql_database
bec26ae393e2-5
SELECT * FROM 'Customer' LIMIT 3; CustomerId FirstName LastName Company Address City State Country PostalCode Phone Fax Email SupportRepId 1 Luís Gonçalves Embraer - Empresa Brasileira de Aeronáutica S.A. Av. Brigadeiro Faria Lima, 2170 São José dos Campos SP Brazil 12227-000 +55 (12) 3923-5555 +55 (12) 3923-5566 luisg...
https://python.langchain.com/docs/integrations/toolkits/sql_database
bec26ae393e2-6
SELECT * FROM 'Invoice' LIMIT 3; InvoiceId CustomerId InvoiceDate BillingAddress BillingCity BillingState BillingCountry BillingPostalCode Total 1 2 2009-01-01 00:00:00 Theodor-Heuss-Straße 34 Stuttgart None Germany 70174 1.98 2 4 2009-01-02 00:00:00 Ullevålsveien 14 Oslo None Norway 0171 3.96 3 8 2009-01-03 00:00:00 G...
https://python.langchain.com/docs/integrations/toolkits/sql_database
bec26ae393e2-7
> Entering new AgentExecutor chain... Action: list_tables_sql_db Action Input: "" Observation: Invoice, MediaType, Artist, InvoiceLine, Genre, Playlist, Employee, Album, PlaylistTrack, Track, Customer Thought: I should look at the schema of the Playlist and PlaylistTrack tables to see what columns I can use. Action: sc...
https://python.langchain.com/docs/integrations/toolkits/sql_database
bec26ae393e2-8
SELECT Playlist.Name, COUNT(PlaylistTrack.TrackId) AS TotalTracks FROM Playlist INNER JOIN PlaylistTrack ON Playlist.PlaylistId = PlaylistTrack.PlaylistId GROUP BY Playlist.Name Thought: The query looks correct, I can now execute it. Action: query_sql_db Action Input: SELECT Playlist.Name, COUNT(PlaylistTrack.TrackId) ...
https://python.langchain.com/docs/integrations/toolkits/sql_database
bec26ae393e2-9
> Entering new AgentExecutor chain... Action: list_tables_sql_db Action Input: "" Observation: MediaType, Track, Invoice, Album, Playlist, Customer, Employee, InvoiceLine, PlaylistTrack, Genre, Artist Thought: I should look at the schema of the Artist, InvoiceLine, and Track tables to see what columns I can use. Action...
https://python.langchain.com/docs/integrations/toolkits/sql_database
bec26ae393e2-10
CREATE TABLE "InvoiceLine" ( "InvoiceLineId" INTEGER NOT NULL, "InvoiceId" INTEGER NOT NULL, "TrackId" INTEGER NOT NULL, "UnitPrice" NUMERIC(10, 2) NOT NULL, "Quantity" INTEGER NOT NULL, PRIMARY KEY ("InvoiceLineId"), FOREIGN KEY("TrackId") REFERENCES "Track" ("TrackId"), FOREIGN KEY("InvoiceId") REFERENCES "Inv...
https://python.langchain.com/docs/integrations/toolkits/sql_database
bec26ae393e2-11
SELECT Artist.Name, SUM(InvoiceLine.Quantity) AS TotalQuantity FROM Artist INNER JOIN Track ON Artist.ArtistId = Track.ArtistId INNER JOIN InvoiceLine ON Track.TrackId = InvoiceLine.TrackId GROUP BY Artist.Name ORDER BY TotalQuantity DESC LIMIT 3; Thought: I now know the final answer. Action: query_sql_db Action ...
https://python.langchain.com/docs/integrations/toolkits/sql_database
0a55f954a7b5-0
Nuclia Understanding Nuclia automatically indexes your unstructured data from any internal and external source, providing optimized search results and generative answers. It can handle video and audio transcription, image content extraction, and document parsing. The Nuclia Understanding API supports the processing of ...
https://python.langchain.com/docs/integrations/tools/nuclia
0a55f954a7b5-1
asyncio.run(process()) Retrieved information​ Nuclia returns the following information: file metadata extracted text nested text (like text in an embedded image) a summary (only when enable_ml is set to True) paragraphs and sentences splitting (defined by the position of their first and last characters, plus start time...
https://python.langchain.com/docs/integrations/tools/nuclia
18d0ee06de5d-0
Xorbits This notebook shows how to use agents to interact with Xorbits Pandas dataframe and Xorbits Numpy ndarray. It is mostly optimized for question answering. NOTE: this agent calls the Python agent under the hood, which executes LLM generated Python code - this can be bad if the LLM generated Python code is harmful...
https://python.langchain.com/docs/integrations/toolkits/xorbits
18d0ee06de5d-1
> Finished chain. 'The mean age is 29.69911764705882.' agent.run("Group the data by sex and find the average age for each group") > Entering new chain... Thought: I need to group the data by sex and then find the average age for each group Action: python_repl_ast Action Input: data.groupby('Sex')['Age'].mean() ...
https://python.langchain.com/docs/integrations/toolkits/xorbits
18d0ee06de5d-2
> Entering new chain... Thought: I need to find out the shape of the array Action: python_repl_ast Action Input: data.shape Observation: (6,) Thought: I now know the final answer Final Answer: The shape of the array is (6,). > Finished chain. 'The shape of the array is (6,).' agent.run("Give the 2nd element of th...
https://python.langchain.com/docs/integrations/toolkits/xorbits
18d0ee06de5d-3
> Finished chain. 'The sum of the array along the first axis is [9, 12].' arr = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) agent = create_xorbits_agent(OpenAI(temperature=0), arr, verbose=True) 0%| | 0.00/100 [00:00<?, ?it/s] agent.run("calculate the covariance matrix") > Entering new chain... Thought: I need t...
https://python.langchain.com/docs/integrations/toolkits/xorbits
b6c8afdd9100-0
This notebook goes over how to use the OpenWeatherMap component to fetch weather information. from langchain.llms import OpenAI from langchain.agents import load_tools, initialize_agent, AgentType import os os.environ["OPENAI_API_KEY"] = "" os.environ["OPENWEATHERMAP_API_KEY"] = "" llm = OpenAI(temperature=0) tools ...
https://python.langchain.com/docs/integrations/tools/openweathermap
7bc1cb56c157-0
This notebook goes over how to use PubMed as a tool. 'Published: <Year>2023</Year><Month>May</Month><Day>31</Day>\nTitle: Dermatology in the wake of an AI revolution: who gets a say?\nSummary: \n\nPublished: <Year>2023</Year><Month>May</Month><Day>30</Day>\nTitle: What is ChatGPT and what do we do with it? Implications...
https://python.langchain.com/docs/integrations/tools/pubmed
9b287759b8f8-0
The web contains a lot of information that LLMs do not have access to. In order to easily let LLMs interact with that information, we provide a wrapper around the Python Requests module that takes in a URL and fetches data from that URL. Each requests tool contains a requests wrapper. You can work with these wrappers d...
https://python.langchain.com/docs/integrations/tools/requests
9b287759b8f8-1
'<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="en"><head><meta content="Search the world\'s information, including webpages, images, videos and more. Google has many special features to help you find exactly what you\'re looking for." name="description"><meta content="noodp" name="robots"...
https://python.langchain.com/docs/integrations/tools/requests
9b287759b8f8-2
nonce="MXrF0nnIBPkxBza4okrgPA">(function(){window.google={kEI:\'TA9QZOa5EdTakPIPuIad-Ac\',kEXPI:\'0,1359409,6059,206,4804,2316,383,246,5,1129120,1197768,626,380097,16111,28687,22431,1361,12319,17581,4997,13228,37471,7692,2891,3926,213,7615,606,50058,8228,17728,432,3,346,1244,1,16920,2648,4,1528,2304,29062,9871,3194,136...
https://python.langchain.com/docs/integrations/tools/requests
9b287759b8f8-3
0,2,3,15965,872,7830,1796,10008,7,1922,9779,36154,6305,2007,17765,427,20136,14,82,2730,184,13600,3692,109,2412,1548,4308,3785,15175,3888,1515,3030,5628,478,4,9706,1804,7734,2738,1853,1032,9480,2995,576,1041,5648,3722,2058,3048,2130,2365,662,476,958,87,111,5807,2,975,1167,891,3580,1439,1128,7343,426,249,517,95,1102,14,6...
https://python.langchain.com/docs/integrations/tools/requests
9b287759b8f8-4
,232,22,442,961,45,214,383,567,500,487,151,120,256,253,179,673,2,102,2,10,535,123,135,1685,5206695,190,2,20,50,198,5994221,2804424,3311,141,795,19735,1,1,346,5008,7,13,10,24,31,2,39,1,5,1,16,7,2,41,247,4,9,7,9,15,4,4,121,24,23944834,4042142,1964,16672,2894,6250,15739,1726,647,409,837,1411438,146986,23612960,7,84,93,33,...
https://python.langchain.com/docs/integrations/tools/requests
9b287759b8f8-5
:89978449};google.sn=\'webhp\';google.kHL=\'en\';})();(function(){\nvar
https://python.langchain.com/docs/integrations/tools/requests
9b287759b8f8-6
h=this||self;function l(){return void 0!==window.google&&void 0!==window.google.kOPI&&0!==window.google.kOPI?window.google.kOPI:null};var m,n=[];function p(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return b||m}function q(a){for(var b=null;a&&(!a.getAttribute||!(b=a.getAttribute("leid...
https://python.langchain.com/docs/integrations/tools/requests
9b287759b8f8-7
c=a.id;else{do c=Math.random();while(google.y[c])}google.y[c]=[a,b];return!1};google.sx=function(a){google.sy.push(a)};google.lm=[];google.plm=function(a){google.lm.push.apply(google.lm,a)};google.lq=[];google.load=function(a,b,c){google.lq.push([[a],b,c])};google.loadAll=function(a,b){google.lq.push([a,b])};google.bx=...
https://python.langchain.com/docs/integrations/tools/requests
9b287759b8f8-8
8px 0}td{line-height:.8em}.gac_m td{line-height:17px}form{margin-bottom:20px}.h{color:#1558d6}em{font-weight:bold;font-style:normal}.lst{height:25px;width:496px}.gsfi,.lst{font:18px arial,sans-serif}.gsfs{font:17px arial,sans-serif}.ds{display:inline-box;display:inline-block;margin:3px 0 4px;margin-left:4px}input{font-...
https://python.langchain.com/docs/integrations/tools/requests
9b287759b8f8-9
a;b=!1}else b=!a||!a.message||"Error loading script"===a.message||q>=l&&!m?!1:!0;if(!b)return null;q++;d=d||{};b=encodeURIComponent;var c="/gen_204?atyp=i&ei="+b(google.kEI);google.kEXPI&&(c+="&jexpid="+b(google.kEXPI));c+="&srcpg="+b(google.sn)+"&jsr="+b(t.jsr)+"&bver="+b(t.bv);var f=a.lineNumber;void 0!==f&&(c+="&lin...
https://python.langchain.com/docs/integrations/tools/requests
9b287759b8f8-10
&& window.n();if (document.images){new Image().src=src;}\nif (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();}\n}\n})();</script><div id="mngb"><div id=gbar><nobr><b class=gb1>Search</b> <a class=gb1 href="https://www.google.com/imghp?hl=en&tab=wi">Images</a> <a class=gb1 href="https://m...
https://python.langchain.com/docs/integrations/tools/requests
9b287759b8f8-11
id="lgpd"><div id="lga"><img alt="Google" height="92" src="/images/branding/googlelogo/1x/googlelogo_white_background_color_272x92dp.png" style="padding:28px 0 14px" width="272" id="hplogo"><br><br></div><form action="/search" name="f"><table cellpadding="0" cellspacing="0"><tr valign="top"><td width="25%">&nbsp;</td><...
https://python.langchain.com/docs/integrations/tools/requests
9b287759b8f8-12
width="25%"><a href="/advanced_search?hl=en&amp;authuser=0">Advanced search</a></td></tr></table><input id="gbv" name="gbv" type="hidden" value="1"><script nonce="MXrF0nnIBPkxBza4okrgPA">(function(){var a,b="1";if(document&&document.getElementById)if("undefined"!=typeof XMLHttpRequest)b="2";else if("undefined"!=typeof ...
https://python.langchain.com/docs/integrations/tools/requests
9b287759b8f8-13
class="NKcBbd" href="https://www.google.com/url?q=https://blog.google/outreach-initiatives/diversity/asian-pacific-american-heritage-month-2023/%3Futm_source%3Dhpp%26utm_medium%3Downed%26utm_campaign%3Dapahm&amp;source=hpp&amp;id=19035152&amp;ct=3&amp;usg=AOvVaw1zrN82vzhoWl4hz1zZ4gLp&amp;sa=X&amp;ved=0ahUKEwjmj7fr6dT-A...
https://python.langchain.com/docs/integrations/tools/requests
9b287759b8f8-14
<script nonce="MXrF0nnIBPkxBza4okrgPA">(function(){google.xjs={ck:\'xjs.hp.vUsZk7fd8do.L.X.O\',cs:\'ACT90oF8ktm8JGoaZ23megDhHoJku7YaGw\',excm:[]};})();</script> <script nonce="MXrF0nnIBPkxBza4okrgPA">(function(){var u=\'/xjs/_/js/k\\x3dxjs.hp.en.q0lHXBfs9JY.O/am\\x3dAAAA6AQAUABgAQ/d\\x3d1/ed\\x3d1/rs\\x3dACT90oE3ek6-fj...
https://python.langchain.com/docs/integrations/tools/requests
9b287759b8f8-15
0:q.call(k,"script[nonce]"))?a.nonce||a.getAttribute("nonce")||"":"")&&b.setAttribute("nonce",k);document.body.appendChild(b);google.psa=!0;google.lx=g};google.bx||google.lx()};google.xjsu=u;e._F_jsUrl=u;setTimeout(function(){0<amd?google.caft(function(){return p()},amd):p()},0);})();window._ = window._ || {};window._D...
https://python.langchain.com/docs/integrations/tools/requests
9b287759b8f8-16
search was removed from your \\\\u003Ca href\\x3d\\\\\\x22/history\\\\\\x22\\\\u003EWeb History\\\\u003C/a\\\\u003E\\x22,\\x22psrl\\x22:\\x22Remove\\x22,\\x22sbit\\x22:\\x22Search by image\\x22,\\x22srch\\x22:\\x22Google Search\\x22},\\x22ovr\\x22:{},\\x22pq\\x22:\\x22\\x22,\\x22rfs\\x22:[],\\x22sbas\\x22:\\x220 3px 8p...
https://python.langchain.com/docs/integrations/tools/requests
c91eb2525dca-0
SceneXplain is an ImageCaptioning service accessible through the SceneXplain Tool. To use this tool, you'll need to make an account and fetch your API Token from the website. Then you can instantiate the tool. Or directly instantiate the tool. from langchain.llms import OpenAI from langchain.agents import initialize_ag...
https://python.langchain.com/docs/integrations/tools/sceneXplain
c91eb2525dca-1
In the background of the scene, a street sign can be seen jutting out from the pavement amidst a flurry of raindrops. A sign with Chinese characters adorns its surface, adding to the sense of cultural diversity and intrigue. Despite the dreary weather, there is an undeniable sense of joy and camaraderie in this heartwa...
https://python.langchain.com/docs/integrations/tools/sceneXplain
41237be97d08-0
This notebook shows off usage of various search tools. First, let's try to use the Google Serper API tool. Now, let's use the SerpAPI tool. Now, let's use the official Google Search API Wrapper. > Entering new AgentExecutor chain... I should look up the current weather conditions. Action: Google Search Action Input: ...
https://python.langchain.com/docs/integrations/tools/search_tools
41237be97d08-1
'Showers early becoming a steady light rain later in the day. Near record high temperatures. High around 60F. Winds SW at 10 to 15 mph. Chance of rain 60%.' Here we will be using a self hosted SearxNG meta search engine.
https://python.langchain.com/docs/integrations/tools/search_tools
250ae4ac54fb-0
This notebook goes over how to use a self hosted SearxNG search API to search the web. For some engines, if a direct answer is available the warpper will print the answer instead of the full list of search results. You can use the results method of the wrapper if you want to obtain all the results. SearxNG supports 135...
https://python.langchain.com/docs/integrations/tools/searx_search
250ae4ac54fb-1
'title': 'Co-training improves prompt-based learning for large language ' 'models', 'link': 'https://proceedings.mlr.press/v162/lang22a.html', 'engines': ['google scholar'], 'category': 'science'}, {'snippet': '… With the success of large language models (LLMs) of code and ' 'their use as … prompt design process become...
https://python.langchain.com/docs/integrations/tools/searx_search
250ae4ac54fb-2
{'snippet': 'Cross-prompt automated essay scoring (AES) requires the system ' 'to use non target-prompt essays to award scores to a ' 'target-prompt essay. Since obtaining a large quantity of ' 'pre-graded essays to a particular prompt is often difficult and ' 'unrealistic, the task of cross-prompt AES is vital for the...
https://python.langchain.com/docs/integrations/tools/searx_search
250ae4ac54fb-3
'show that 1) the number and the quality of prompt examples ' 'matter, where using suboptimal examples degenerates translation; ' '2) several features of prompt examples, such as semantic ' 'similarity, show significant Spearman correlation with their ' 'prompting performance; yet, none of the correlations are strong '...
https://python.langchain.com/docs/integrations/tools/searx_search
250ae4ac54fb-4
'good movie, and a good prompt too?', 'link': 'http://arxiv.org/abs/2212.10539v1', 'engines': ['arxiv'], 'category': 'science'}, {'snippet': 'Prevailing methods for mapping large generative language models ' "to supervised tasks may fail to sufficiently probe models' novel " 'capabilities. Using GPT-3 as a case study, ...
https://python.langchain.com/docs/integrations/tools/searx_search
250ae4ac54fb-5
'link': 'https://gitlab.com/BrianPulfer/LMWatermark', 'engines': ['gitlab'], 'category': 'it'}, {'snippet': 'Guide to using pre-trained large language models of source code', 'title': 'Code-LMs', 'link': 'https://github.com/VHellendoorn/Code-LMs', 'engines': ['github'], 'category': 'it'}, {'snippet': '', 'title': 'Sime...
https://python.langchain.com/docs/integrations/tools/searx_search
250ae4ac54fb-6
'Hugging Face 🤗 Transformers.', 'title': 'mistral', 'link': 'https://github.com/stanford-crfm/mistral', 'engines': ['github'], 'category': 'it'}, {'snippet': 'A prize for finding tasks that cause large language models to ' 'show inverse scaling', 'title': 'prize', 'link': 'https://github.com/inverse-scaling/prize', 'e...
https://python.langchain.com/docs/integrations/tools/searx_search
250ae4ac54fb-7
'engines': ['github'], 'category': 'it'}, {'snippet': 'ChatGPT @ Home: Large Language Model (LLM) chatbot application, ' 'written by ChatGPT', 'title': 'ChatGPT-at-Home', 'link': 'https://github.com/Sentdex/ChatGPT-at-Home', 'engines': ['github'], 'category': 'it'}, {'snippet': 'Design and Deploy Large Language Model A...
https://python.langchain.com/docs/integrations/tools/searx_search
96e04baf56c0-0
SerpAPI This notebook goes over how to use the SerpAPI component to search the web. from langchain.utilities import SerpAPIWrapper search = SerpAPIWrapper() search.run("Obama's first name?") 'Barack Hussein Obama II' Custom Parameters​ You can also customize the SerpAPI wrapper with arbitrary parameters. For example, i...
https://python.langchain.com/docs/integrations/tools/serpapi
081604928ae0-0
Twilio This notebook goes over how to use the Twilio API wrapper to send a message through SMS or Twilio Messaging Channels. Twilio Messaging Channels facilitates integrations with 3rd party messaging apps and lets you send messages through WhatsApp Business Platform (GA), Facebook Messenger (Public Beta) and Google Bu...
https://python.langchain.com/docs/integrations/tools/twilio
f214ca03c2e5-0
This example demonstrates the use of the SQLDatabaseChain for answering questions over a SQL database. Under the hood, LangChain uses SQLAlchemy to connect to SQL databases. The SQLDatabaseChain can therefore be used with any SQL dialect supported by SQLAlchemy, such as MS SQL, MySQL, MariaDB, PostgreSQL, Oracle SQL, D...
https://python.langchain.com/docs/integrations/tools/sqlite
f214ca03c2e5-1
If someone asks for the table foobar, they really mean the employee table. Question: {input}""" PROMPT = PromptTemplate( input_variables=["input", "table_info", "dialect"], template=_DEFAULT_TEMPLATE ) You can also return the intermediate steps of the SQLDatabaseChain. This allows you to access the SQL statement that ...
https://python.langchain.com/docs/integrations/tools/sqlite
f214ca03c2e5-2
[{'input': 'How many employees are there in the foobar table?\nSQLQuery:SELECT COUNT(*) FROM Employee;\nSQLResult: [(8,)]\nAnswer:', 'top_k': '5', 'dialect': 'sqlite',
https://python.langchain.com/docs/integrations/tools/sqlite
f214ca03c2e5-3
'table_info': '\nCREATE TABLE "Artist" (\n\t"ArtistId" INTEGER NOT NULL, \n\t"Name" NVARCHAR(120), \n\tPRIMARY KEY ("ArtistId")\n)\n\n/*\n3 rows from Artist table:\nArtistId\tName\n1\tAC/DC\n2\tAccept\n3\tAerosmith\n*/\n\n\nCREATE TABLE "Employee" (\n\t"EmployeeId" INTEGER NOT NULL, \n\t"LastName" NVARCHAR(20) NOT NULL...
https://python.langchain.com/docs/integrations/tools/sqlite
f214ca03c2e5-4
(403) 262-3443\t+1 (403) 262-3322\tnancy@chinookcorp.com\n3\tPeacock\tJane\tSales Support Agent\t2\t1973-08-29 00:00:00\t2002-04-01 00:00:00\t1111 6 Ave SW\tCalgary\tAB\tCanada\tT2P 5M5\t+1 (403) 262-3443\t+1 (403) 262-6712\tjane@chinookcorp.com\n*/\n\n\nCREATE TABLE "Genre" (\n\t"GenreId" INTEGER NOT NULL, \n\t"Name" ...
https://python.langchain.com/docs/integrations/tools/sqlite
f214ca03c2e5-5
TABLE "Customer" (\n\t"CustomerId" INTEGER NOT NULL, \n\t"FirstName" NVARCHAR(40) NOT NULL, \n\t"LastName" NVARCHAR(20) NOT NULL, \n\t"Company" NVARCHAR(80), \n\t"Address" NVARCHAR(70), \n\t"City" NVARCHAR(40), \n\t"State" NVARCHAR(40), \n\t"Country" NVARCHAR(40), \n\t"PostalCode" NVARCHAR(10), \n\t"Phone" NVARCHAR(24)...
https://python.langchain.com/docs/integrations/tools/sqlite
f214ca03c2e5-6
NVARCHAR(70), \n\t"BillingCity" NVARCHAR(40), \n\t"BillingState" NVARCHAR(40), \n\t"BillingCountry" NVARCHAR(40), \n\t"BillingPostalCode" NVARCHAR(10), \n\t"Total" NUMERIC(10, 2) NOT NULL, \n\tPRIMARY KEY ("InvoiceId"), \n\tFOREIGN KEY("CustomerId") REFERENCES "Customer" ("CustomerId")\n)\n\n/*\n3 rows from Invoice tab...
https://python.langchain.com/docs/integrations/tools/sqlite
f214ca03c2e5-7
Salute You)\t1\t1\t1\tAngus Young, Malcolm Young, Brian Johnson\t343719\t11170334\t0.99\n2\tBalls to the Wall\t2\t2\t1\tNone\t342562\t5510424\t0.99\n3\tFast As a Shark\t3\t2\t1\tF. Baltes, S. Kaufman, U. Dirkscneider & W. Hoffman\t230619\t3990994\t0.99\n*/\n\n\nCREATE TABLE "InvoiceLine" (\n\t"InvoiceLineId" INTEGER NO...
https://python.langchain.com/docs/integrations/tools/sqlite
f214ca03c2e5-8
'stop': ['\nSQLResult:']}, 'SELECT COUNT(*) FROM Employee;', {'query': 'SELECT COUNT(*) FROM Employee;', 'dialect': 'sqlite'}, 'SELECT COUNT(*) FROM Employee;', '[(8,)]'] If you are querying for several rows of a table you can select the maximum number of results you want to get by using the 'top_k' parameter (default ...
https://python.langchain.com/docs/integrations/tools/sqlite
f214ca03c2e5-9
> Entering new SQLDatabaseChain chain... What are some example tracks by Bach? SQLQuery:SELECT "Name", "Composer" FROM "Track" WHERE "Composer" LIKE '%Bach%' LIMIT 5 SQLResult: [('American Woman', 'B. Cummings/G. Peterson/M.J. Kale/R. Bachman'), ('Concerto for 2 Violins in D Minor, BWV 1043: I. Vivace', 'Johann Sebasti...
https://python.langchain.com/docs/integrations/tools/sqlite
f214ca03c2e5-10
'Tracks by Bach include \'American Woman\', \'Concerto for 2 Violins in D Minor, BWV 1043: I. Vivace\', \'Aria Mit 30 Veränderungen, BWV 988 "Goldberg Variations": Aria\', \'Suite for Solo Cello No. 1 in G Major, BWV 1007: I. Prélude\', and \'Toccata and Fugue in D Minor, BWV 565: I. Toccata\'.' In some cases, it can b...
https://python.langchain.com/docs/integrations/tools/sqlite
f214ca03c2e5-11
> Entering new SQLDatabaseChain chain... What are some example tracks by Bach? SQLQuery:SELECT "Name" FROM Track WHERE "Composer" LIKE '%Bach%' LIMIT 5; SQLResult: [('American Woman',), ('Concerto for 2 Violins in D Minor, BWV 1043: I. Vivace',), ('Aria Mit 30 Veränderungen, BWV 988 "Goldberg Variations": Aria',), ('Su...
https://python.langchain.com/docs/integrations/tools/sqlite
f214ca03c2e5-12
Answer:text='You are a SQLite expert. Given an input question, first create a syntactically correct SQLite query to run, then look at the results of the query and return the answer to the input question.\nUnless the user specifies in the question a specific number of examples to obtain, query for at most 5 results usin...
https://python.langchain.com/docs/integrations/tools/sqlite
f214ca03c2e5-13
Vivace\',), (\'Aria Mit 30 Veränderungen, BWV 988 "Goldberg Variations": Aria\',), (\'Suite for Solo Cello No. 1 in G Major, BWV 1007: I. Prélude\',), (\'Toccata and Fugue in D Minor, BWV 565: I. Toccata\',)]\nAnswer:'
https://python.langchain.com/docs/integrations/tools/sqlite
f214ca03c2e5-14
You are a SQLite expert. Given an input question, first create a syntactically correct SQLite query to run, then look at the results of the query and return the answer to the input question. Unless the user specifies in the question a specific number of examples to obtain, query for at most 5 results using the LIMIT cl...
https://python.langchain.com/docs/integrations/tools/sqlite
f214ca03c2e5-15
Use the following format: Question: "Question here" SQLQuery: "SQL Query to run" SQLResult: "Result of the SQLQuery" Answer: "Final answer here" Only use the following tables: CREATE TABLE "Playlist" ( "PlaylistId" INTEGER NOT NULL, "Name" NVARCHAR(120), PRIMARY KEY ("PlaylistId") ) /* 2 rows from Playlist table:...
https://python.langchain.com/docs/integrations/tools/sqlite
f214ca03c2e5-16
Question: What are some example tracks by Bach? SQLQuery:SELECT "Name" FROM Track WHERE "Composer" LIKE '%Bach%' LIMIT 5; SQLResult: [('American Woman',), ('Concerto for 2 Violins in D Minor, BWV 1043: I. Vivace',), ('Aria Mit 30 Veränderungen, BWV 988 "Goldberg Variations": Aria',), ('Suite for Solo Cello No. 1 in G M...
https://python.langchain.com/docs/integrations/tools/sqlite
f214ca03c2e5-17
Answer: {'input': 'What are some example tracks by Bach?\nSQLQuery:SELECT "Name" FROM Track WHERE "Composer" LIKE \'%Bach%\' LIMIT 5;\nSQLResult: [(\'American Woman\',), (\'Concerto for 2 Violins in D Minor, BWV 1043: I. Vivace\',), (\'Aria Mit 30 Veränderungen, BWV 988 "Goldberg Variations": Aria\',), (\'Suite for Sol...
https://python.langchain.com/docs/integrations/tools/sqlite