diff --git a/docs/docs/integrations/tools/tavily_extract.ipynb b/docs/docs/integrations/tools/tavily_extract.ipynb index eeccc2b7425..b64d615593c 100644 --- a/docs/docs/integrations/tools/tavily_extract.ipynb +++ b/docs/docs/integrations/tools/tavily_extract.ipynb @@ -21,7 +21,7 @@ "### Integration details\n", "| Class | Package | Serializable | [JS support](https://js.langchain.com/docs/integrations/tools/tavily_search) | Package latest |\n", "|:--------------------------------------------------------------|:---------------------------------------------------------------| :---: | :---: | :---: |\n", - "| [TavilyExtract](https://github.com/tavily-ai/langchain-tavily) | [langchain-tavily](https://pypi.org/project/langchain-tavily/) | ❌ | ❌ | ![PyPI - Version](https://img.shields.io/pypi/v/langchain-tavily?style=flat-square&label=%20) |\n", + "| [TavilyExtract](https://github.com/tavily-ai/langchain-tavily) | [langchain-tavily](https://pypi.org/project/langchain-tavily/) | ✅ | ❌ | ![PyPI - Version](https://img.shields.io/pypi/v/langchain-tavily?style=flat-square&label=%20) |\n", "\n", "### Tool features\n", "| [Returns artifact](/docs/how_to/tool_artifacts/) | Native async | Return data | Pricing |\n", @@ -134,9 +134,9 @@ "\n", "The Tavily extract tool accepts the following arguments during invocation:\n", "- `urls` (required): A list of URLs to extract content from. \n", - "- Both `extract_depth` and `include_images` can also be set during invokation\n", + "- Both `extract_depth` and `include_images` can also be set during invocation\n", "\n", - "NOTE: The optional arguments are available for agents to dynamically set, if you set a argument during instantiation and then invoke the tool with a different value, the tool will use the value you passed during invokation. " + "NOTE: The optional arguments are available for agents to dynamically set, if you set an argument during instantiation and then invoke the tool with a different value, the tool will use the value you passed during invocation." ] }, { @@ -253,10 +253,10 @@ "name": "stdout", "output_type": "stream", "text": [ - "================================\u001b[1m Human Message \u001b[0m=================================\n", + "================================\u001B[1m Human Message \u001B[0m=================================\n", "\n", "['https://en.wikipedia.org/wiki/Albert_Einstein','https://en.wikipedia.org/wiki/Theoretical_physics']\n", - "==================================\u001b[1m Ai Message \u001b[0m==================================\n", + "==================================\u001B[1m Ai Message \u001B[0m==================================\n", "Tool Calls:\n", " tavily_extract (call_BAK906Cpy8fDZttwqYTMdkKp)\n", " Call ID: call_BAK906Cpy8fDZttwqYTMdkKp\n", @@ -270,11 +270,11 @@ " urls: ['https://en.wikipedia.org/wiki/Theoretical_physics']\n", " extract_depth: advanced\n", " include_images: False\n", - "=================================\u001b[1m Tool Message \u001b[0m=================================\n", + "=================================\u001B[1m Tool Message \u001B[0m=================================\n", "Name: tavily_extract\n", "\n", "{\"results\": [{\"url\": \"https://en.wikipedia.org/wiki/Theoretical_physics\", \"raw_content\": \"Published Time: 2003-09-21T15:11:11Z\\nTheoretical physics - Wikipedia\\nJump to content\\nMain menu\\nMain menu\\nmove to sidebar hide\\nNavigation\\n\\nMain page\\nContents\\nCurrent events\\nRandom article\\nAbout Wikipedia\\nContact us\\n\\nContribute\\n\\nHelp\\nLearn to edit\\nCommunity portal\\nRecent changes\\nUpload file\\nSpecial pages\\n\\n \\nSearch\\nSearch\\nAppearance\\n\\nDonate\\nCreate account\\nLog in\\n\\nPersonal tools\\n\\nDonate\\nCreate account\\nLog in\\n\\nPages for logged out editors learn more\\n\\nContributions\\nTalk\\n\\nContents\\nmove to sidebar hide\\n\\n(Top)\\n\\n1 Overview\\n\\n\\n2 History\\n\\n\\n3 Mainstream theoriesToggle Mainstream theories subsection\\n\\n3.1 Examples\\n\\n\\n\\n4 Proposed theories\\n\\n\\n5 Fringe theoriesToggle Fringe theories subsection\\n\\n5.1 Examples\\n\\n\\n\\n6 Thought experiments vs real experiments\\n\\n\\n7 See also\\n\\n\\n8 Notes\\n\\n\\n9 References\\n\\n\\n10 Further reading\\n\\n\\n11 External links\\n\\n\\nToggle the table of contents\\nTheoretical physics\\n77 languages\\n\\nAfrikaans\\nالعربية\\nAsturianu\\nAzərbaycanca\\nবাংলা\\nBasa Banyumasan\\nБеларуская\\nБеларуская (тарашкевіца)\\nभोजपुरी\\nБългарски\\nBosanski\\nBrezhoneg\\nCatalà\\nЧӑвашла\\nČeština\\nDansk\\nDeutsch\\nEesti\\nΕλληνικά\\nEspañol\\nEsperanto\\nEuskara\\nفارسی\\nFrançais\\nFrysk\\nGalego\\n한국어\\nՀայերեն\\nहिन्दी\\nHrvatski\\nBahasa Indonesia\\nInterlingua\\nItaliano\\nעברית\\nҚазақша\\nKurdî\\nLatina\\nLatviešu\\nLietuvių\\nMagyar\\nМакедонски\\nმარგალური\\nBahasa Melayu\\nМонгол\\nNederlands\\n日本語\\nNorsk bokmål\\nNorsk nynorsk\\nਪੰਜਾਬੀ\\nپنجابی\\nPolski\\nPortuguês\\nRomână\\nРусский\\nScots\\nShqip\\nSlovenčina\\nSlovenščina\\nکوردی\\nСрпски / srpski\\nSrpskohrvatski / српскохрватски\\nSunda\\nSuomi\\nSvenska\\nTagalog\\nதமிழ்\\nТатарча / tatarça\\nไทย\\nTürkçe\\nУкраїнська\\nاردو\\nTiếng Việt\\nWinaray\\n吴语\\n粵語\\nZazaki\\n中文\\n\\nEdit links\\n\\nArticle\\nTalk\\n\\nEnglish\\n\\nRead\\nEdit\\nView history\\n\\nTools\\nTools\\nmove to sidebar hide\\nActions\\n\\nRead\\nEdit\\nView history\\n\\nGeneral\\n\\nWhat links here\\nRelated changes\\nUpload file\\nPermanent link\\nPage information\\nCite this page\\nGet shortened URL\\nDownload QR code\\n\\nPrint/export\\n\\nDownload as PDF\\nPrintable version\\n\\nIn other projects\\n\\nWikimedia Commons\\nWikiversity\\nWikidata item\\n\\nAppearance\\nmove to sidebar hide\\nFrom Wikipedia, the free encyclopedia\\nBranch of physics\\n\\nVisual representation of a Schwarzschild wormhole. Wormholes have never been observed, but they are predicted to exist through mathematical models and scientific theory.\\nTheoretical physics is a branch of physics that employs mathematical models and abstractions of physical objects and systems to rationalize, explain, and predict natural phenomena. This is in contrast to experimental physics, which uses experimental tools to probe these phenomena.\\nThe advancement of science generally depends on the interplay between experimental studies and theory. In some cases, theoretical physics adheres to standards of mathematical rigour while giving little weight to experiments and observations.[a] For example, while developing special relativity, Albert Einstein was concerned with the Lorentz transformation which left Maxwell's equations invariant, but was apparently uninterested in the Michelson–Morley experiment on Earth's drift through a luminiferous aether.[1] Conversely, Einstein was awarded the Nobel Prize for explaining the photoelectric effect, previously an experimental result lacking a theoretical formulation.[2]\\nOverview\\n[edit]\\nA physical theory is a model of physical events. It is judged by the extent to which its predictions agree with empirical observations. The quality of a physical theory is also judged on its ability to make new predictions which can be verified by new observations. A physical theory differs from a mathematical theorem in that while both are based on some form of axioms, judgment of mathematical applicability is not based on agreement with any experimental results.[3][4] A physical theory similarly differs from a mathematical theory, in the sense that the word \\\"theory\\\" has a different meaning in mathematical terms.[b]\\n\\nR i c \\\\= k g {\\\\displaystyle \\\\mathrm {Ric} =kg} The equations for an Einstein manifold, used in general relativity to describe the curvature of spacetime\\n\\nA physical theory involves one or more relationships between various measurable quantities. Archimedes realized that a ship floats by displacing its mass of water, Pythagoras understood the relation between the length of a vibrating string and the musical tone it produces.[5][6] Other examples include entropy as a measure of the uncertainty regarding the positions and motions of unseen particles and the quantum mechanical idea that (action and) energy are not continuously variable.\\nTheoretical physics consists of several different approaches. In this regard, theoretical particle physics forms a good example. For instance: \\\"phenomenologists\\\" might employ (semi-) empirical formulas and heuristics to agree with experimental results, often without deep physical understanding.[c] \\\"Modelers\\\" (also called \\\"model-builders\\\") often appear much like phenomenologists, but try to model speculative theories that have certain desirable features (rather than on experimental data), or apply the techniques of mathematical modeling to physics problems.[d] Some attempt to create approximate theories, called effective theories, because fully developed theories may be regarded as unsolvable or too complicated. Other theorists may try to unify, formalise, reinterpret or generalise extant theories, or create completely new ones altogether.[e] Sometimes the vision provided by pure mathematical systems can provide clues to how a physical system might be modeled;[f] e.g., the notion, due to Riemann and others, that space itself might be curved. Theoretical problems that need computational investigation are often the concern of computational physics.\\nTheoretical advances may consist in setting aside old, incorrect paradigms (e.g., aether theory of light propagation, caloric theory of heat, burning consisting of evolving phlogiston, or astronomical bodies revolving around the Earth) or may be an alternative model that provides answers that are more accurate or that can be more widely applied. In the latter case, a correspondence principle will be required to recover the previously known result.[7][8] Sometimes though, advances may proceed along different paths. For example, an essentially correct theory may need some conceptual or factual revisions; atomic theory, first postulated millennia ago (by several thinkers in Greece and India) and the two-fluid theory of electricity[9] are two cases in this point. However, an exception to all the above is the wave–particle duality, a theory combining aspects of different, opposing models via the Bohr complementarity principle.\\n\\nRelationship between mathematics and physics\\nPhysical theories become accepted if they are able to make correct predictions and no (or few) incorrect ones. The theory should have, at least as a secondary objective, a certain economy and elegance (compare to mathematical beauty), a notion sometimes called \\\"Occam's razor\\\" after the 13th-century English philosopher William of Occam (or Ockham), in which the simpler of two theories that describe the same matter just as adequately is preferred (but conceptual simplicity may mean mathematical complexity).[10] They are also more likely to be accepted if they connect a wide range of phenomena. Testing the consequences of a theory is part of the scientific method.\\nPhysical theories can be grouped into three categories: mainstream theories, proposed theories and fringe theories.\\nHistory\\n[edit]\\nFurther information: History of physics\\nTheoretical physics began at least 2,300 years ago, under the Pre-socratic philosophy, and continued by Plato and Aristotle, whose views held sway for a millennium. During the rise of medieval universities, the only acknowledged intellectual disciplines were the seven liberal arts of the Trivium like grammar, logic, and rhetoric and of the Quadrivium like arithmetic, geometry, music and astronomy. During the Middle Ages and Renaissance, the concept of experimental science, the counterpoint to theory, began with scholars such as Ibn al-Haytham and Francis Bacon. As the Scientific Revolution gathered pace, the concepts of matter, energy, space, time and causality slowly began to acquire the form we know today, and other sciences spun off from the rubric of natural philosophy. Thus began the modern era of theory with the Copernican paradigm shift in astronomy, soon followed by Johannes Kepler's expressions for planetary orbits, which summarized the meticulous observations of Tycho Brahe; the works of these men (alongside Galileo's) can perhaps be considered to constitute the Scientific Revolution.\\nThe great push toward the modern concept of explanation started with Galileo, one of the few physicists who was both a consummate theoretician and a great experimentalist. The analytic geometry and mechanics of Descartes were incorporated into the calculus and mechanics of Isaac Newton, another theoretician/experimentalist of the highest order, writing Principia Mathematica.[11] In it contained a grand synthesis of the work of Copernicus, Galileo and Kepler; as well as Newton's theories of mechanics and gravitation, which held sway as worldviews until the early 20th century. Simultaneously, progress was also made in optics (in particular colour theory and the ancient science of geometrical optics), courtesy of Newton, Descartes and the Dutchmen Snell and Huygens. In the 18th and 19th centuries Joseph-Louis Lagrange, Leonhard Euler and William Rowan Hamilton would extend the theory of classical mechanics considerably.[12] They picked up the interactive intertwining of mathematics and physics begun two millennia earlier by Pythagoras.\\nAmong the great conceptual achievements of the 19th and 20th centuries were the consolidation of the idea of energy (as well as its global conservation) by the inclusion of heat, electricity and magnetism, and then light. The laws of thermodynamics, and most importantly the introduction of the singular concept of entropy began to provide a macroscopic explanation for the properties of matter. Statistical mechanics (followed by statistical physics and Quantum statistical mechanics) emerged as an offshoot of thermodynamics late in the 19th century. Another important event in the 19th century was the discovery of electromagnetic theory, unifying the previously separate phenomena of electricity, magnetism and light.\\nThe pillars of modern physics, and perhaps the most revolutionary theories in the history of physics, have been relativity theory and quantum mechanics. Newtonian mechanics was subsumed under special relativity and Newton's gravity was given a kinematic explanation by general relativity. Quantum mechanics led to an understanding of blackbody radiation (which indeed, was an original motivation for the theory) and of anomalies in the specific heats of solids — and finally to an understanding of the internal structures of atoms and molecules. Quantum mechanics soon gave way to the formulation of quantum field theory (QFT), begun in the late 1920s. In the aftermath of World War 2, more progress brought much renewed interest in QFT, which had since the early efforts, stagnated. The same period also saw fresh attacks on the problems of superconductivity and phase transitions, as well as the first applications of QFT in the area of theoretical condensed matter. The 1960s and 70s saw the formulation of the Standard model of particle physics using QFT and progress in condensed matter physics (theoretical foundations of superconductivity and critical phenomena, among others), in parallel to the applications of relativity to problems in astronomy and cosmology respectively.\\nAll of these achievements depended on the theoretical physics as a moving force both to suggest experiments and to consolidate results — often by ingenious application of existing mathematics, or, as in the case of Descartes and Newton (with Leibniz), by inventing new mathematics. Fourier's studies of heat conduction led to a new branch of mathematics: infinite, orthogonal series.[13]\\nModern theoretical physics attempts to unify theories and explain phenomena in further attempts to understand the Universe, from the cosmological to the elementary particle scale. Where experimentation cannot be done, theoretical physics still tries to advance through the use of mathematical models.\\nMainstream theories\\n[edit]\\nMainstream theories (sometimes referred to as central theories) are the body of knowledge of both factual and scientific views and possess a usual scientific quality of the tests of repeatability, consistency with existing well-established science and experimentation. There do exist mainstream theories that are generally accepted theories based solely upon their effects explaining a wide variety of data, although the detection, explanation, and possible composition are subjects of debate.\\nExamples\\n[edit]\\n\\nBig Bang\\nChaos theory\\nClassical mechanics\\nClassical field theory\\nDynamo theory\\nField theory\\nGinzburg–Landau theory\\nKinetic theory of gases\\nClassical electromagnetism\\nPerturbation theory (quantum mechanics)\\nPhysical cosmology\\nQuantum chromodynamics\\nQuantum complexity theory\\nQuantum electrodynamics\\nQuantum field theory\\nQuantum field theory in curved spacetime\\nQuantum information theory\\nQuantum mechanics\\nQuantum thermodynamics\\nRelativistic quantum mechanics\\nScattering theory\\nStandard Model\\nStatistical physics\\nTheory of relativity\\nWave–particle duality\\n\\nProposed theories\\n[edit]\\nThe proposed theories of physics are usually relatively new theories which deal with the study of physics which include scientific approaches, means for determining the validity of models and new types of reasoning used to arrive at the theory. However, some proposed theories include theories that have been around for decades and have eluded methods of discovery and testing. Proposed theories can include fringe theories in the process of becoming established (and, sometimes, gaining wider acceptance). Proposed theories usually have not been tested. In addition to the theories like those listed below, there are also different interpretations of quantum mechanics, which may or may not be considered different theories since it is debatable whether they yield different predictions for physical experiments, even in principle. For example, AdS/CFT correspondence, Chern–Simons theory, graviton, magnetic monopole, string theory, theory of everything.\\nFringe theories\\n[edit]\\nFringe theories include any new area of scientific endeavor in the process of becoming established and some proposed theories. It can include speculative sciences. This includes physics fields and physical theories presented in accordance with known evidence, and a body of associated predictions have been made according to that theory.\\nSome fringe theories go on to become a widely accepted part of physics. Other fringe theories end up being disproven. Some fringe theories are a form of protoscience and others are a form of pseudoscience. The falsification of the original theory sometimes leads to reformulation of the theory.\\nExamples\\n[edit]\\n\\nAether (classical element)\\nLuminiferous aether\\n\\n\\nDigital physics\\nElectrogravitics\\nStochastic electrodynamics\\nTesla's dynamic theory of gravity\\n\\nThought experiments vs real experiments\\n[edit]\\nMain article: Thought experiment\\n\\\"Thought\\\" experiments are situations created in one's mind, asking a question akin to \\\"suppose you are in this situation, assuming such is true, what would follow?\\\". They are usually created to investigate phenomena that are not readily experienced in every-day situations. Famous examples of such thought experiments are Schrödinger's cat, the EPR thought experiment, simple illustrations of time dilation, and so on. These usually lead to real experiments designed to verify that the conclusion (and therefore the assumptions) of the thought experiments are correct. The EPR thought experiment led to the Bell inequalities, which were then tested to various degrees of rigor, leading to the acceptance of the current formulation of quantum mechanics and probabilism as a working hypothesis.\\nSee also\\n[edit]\\n\\nList of theoretical physicists\\nPhilosophy of physics\\nSymmetry in quantum mechanics\\nTimeline of developments in theoretical physics\\nDouble field theory\\n\\nNotes\\n[edit]\\n\\n^ There is some debate as to whether or not theoretical physics uses mathematics to build intuition and illustrativeness to extract physical insight (especially when normal experience fails), rather than as a tool in formalizing theories. This links to the question of it using mathematics in a less formally rigorous, and more intuitive or heuristic way than, say, mathematical physics.\\n^ Sometimes the word \\\"theory\\\" can be used ambiguously in this sense, not to describe scientific theories, but research (sub)fields and programmes. Examples: relativity theory, quantum field theory, string theory.\\n^ The work of Johann Balmer and Johannes Rydberg in spectroscopy, and the semi-empirical mass formula of nuclear physics are good candidates for examples of this approach.\\n^ The Ptolemaic and Copernican models of the Solar system, the Bohr model of hydrogen atoms and nuclear shell model are good candidates for examples of this approach.\\n^ Arguably these are the most celebrated theories in physics: Newton's theory of gravitation, Einstein's theory of relativity and Maxwell's theory of electromagnetism share some of these attributes.\\n^ This approach is often favoured by (pure) mathematicians and mathematical physicists.\\n\\nReferences\\n[edit]\\n\\n^ van Dongen, Jeroen (2009). \\\"On the role of the Michelson-Morley experiment: Einstein in Chicago\\\". Archive for History of Exact Sciences. 63 (6): 655–663. arXiv:0908.1545. doi:10.1007/s00407-009-0050-5.\\n^ \\\"The Nobel Prize in Physics 1921\\\". The Nobel Foundation. Retrieved 2008-10-09.\\n^ Theorems and Theories Archived 2014-08-19 at the Wayback Machine, Sam Nelson.\\n^ Mark C. Chu-Carroll, March 13, 2007:Theories, Theorems, Lemmas, and Corollaries. Good Math, Bad Math blog.\\n^ Singiresu S. Rao (2007). Vibration of Continuous Systems (illustrated ed.). John Wiley & Sons. 5,12. ISBN 978-0471771715. ISBN 9780471771715\\n^ Eli Maor (2007). The Pythagorean Theorem: A 4,000-year History (illustrated ed.). Princeton University Press. pp. 18–20. ISBN 978-0691125268. ISBN 9780691125268\\n^ Bokulich, Alisa, \\\"Bohr's Correspondence Principle\\\", The Stanford Encyclopedia of Philosophy (Spring 2014 Edition), Edward N. Zalta (ed.)\\n^ Enc. Britannica (1994), pg 844.\\n^ Enc. Britannica (1994), pg 834.\\n^ Simplicity in the Philosophy of Science (retrieved 19 Aug 2014), Internet Encyclopedia of Philosophy.\\n^ See 'Correspondence of Isaac Newton, vol.2, 1676–1687' ed. H W Turnbull, Cambridge University Press 1960; at page 297, document #235, letter from Hooke to Newton dated 24 November 1679.\\n^ Penrose, R (2004). The Road to Reality. Jonathan Cape. p. 471.\\n^ Penrose, R (2004). \\\"9: Fourier decompositions and hyperfunctions\\\". The Road to Reality. Jonathan Cape.\\n\\nFurther reading\\n[edit]\\n\\nPhysical Sciences. Encyclopædia Britannica (Macropaedia). Vol. 25 (15th ed.). 1994.\\nDuhem, Pierre. La théorie physique - Son objet, sa structure, (in French). 2nd edition - 1914. English translation: The physical theory - its purpose, its structure. Republished by Joseph Vrin philosophical bookstore (1981), ISBN 2711602214.\\nFeynman, et al. The Feynman Lectures on Physics (3 vol.). First edition: Addison–Wesley, (1964, 1966).\\n\\nBestselling three-volume textbook covering the span of physics. Reference for both (under)graduate student and professional researcher alike.\\n\\nLandau et al. Course of Theoretical Physics.\\n\\nFamous series of books dealing with theoretical concepts in physics covering 10 volumes, translated into many languages and reprinted over many editions. Often known simply as \\\"Landau and Lifschits\\\" or \\\"Landau-Lifschits\\\" in the literature.\\n\\nLongair, MS. Theoretical Concepts in Physics: An Alternative View of Theoretical Reasoning in Physics. Cambridge University Press; 2d edition (4 Dec 2003). ISBN 052152878X. ISBN 978-0521528788\\nPlanck, Max (1909). Eight Lectures on theoretical physics. Library of Alexandria. ISBN 1465521887, ISBN 9781465521880.\\n\\nA set of lectures given in 1909 at Columbia University.\\n\\nSommerfeld, Arnold. Vorlesungen über theoretische Physik (Lectures on Theoretical Physics); German, 6 volumes.\\n\\nA series of lessons from a master educator of theoretical physicists.\\nExternal links\\n[edit]\\n\\nWikibooks has a book on the topic of: Introduction to Theoretical Physics\\n\\nMIT Center for Theoretical Physics\\nHow to become a GOOD Theoretical Physicist, a website made by Gerard 't Hooft\\n\\n| \\n* v\\n* t\\n* e\\nTheoretical physics\\n|\\n| --- |\\n| Structure | \\n\\nPhysics\\nModern\\nTheoretical\\nExperimental\\nComputational\\n\\n\\nTheory\\nList of theoretical physicists\\nPhilosophy of physics\\nTimeline of developments in theoretical physics\\n\\n|\\n| Concepts | \\n\\nDouble field theory\\nT-duality\\nInstanton\\nSelf-organized criticality\\nSupersymmetry\\nSymmetry in quantum mechanics\\nDimensionless physical constant\\n\\n|\\n| Theories and disciplines | \\n\\nRelativistic mechanics\\nSpecial\\nGeneral\\n\\n\\nNuclear physics\\nParticle physics\\nQuantum mechanics\\nString theory\\n\\n|\\n| Subatomic | \\n\\nQuantum field theory\\nSchrödinger equation\\n\\n|\\n| Spaces and objects | \\n\\nTopological space\\nList of manifolds\\nKnot (mathematics)\\nPoisson manifold\\nDifferentiable manifold\\nGeneral topology\\n\\n|\\n| Particles | \\n\\nBosons\\nGluons\\nMesons\\n\\n\\nFermions\\nQuarks\\nLeptons\\n\\n\\nChirality\\nin physics\\n\\n\\nHelicity\\nQuasiparticle\\n\\n|\\n| Processes, interactions | \\n\\nStrong interaction\\nWeak interaction\\nNuclear force\\nFifth force\\nMontonen–Olive duality\\n\\n|\\n| Spacetime | \\n\\nWormhole\\nOrientability\\nCauchy horizon\\nQuantum mechanics of time travel\\nQuantum gravity\\nChronology protection conjecture\\nCausal dynamical triangulation\\nRetrocausality\\nTime reversal symmetry\\nWheeler–Feynman time-symmetric theory\\nMinkowski spacetime\\nTime in physics\\nFour-dimensionalism\\nTipler time machine\\n\\n|\\n| Mathematics | \\n\\nTensors\\nLanglands program\\nRiemann zeta function\\n\\n|\\n| Classic physics | \\n\\nPhysics\\nResearch\\n\\n\\nApplied\\nEngineering\\n\\n\\nAtomic, molecular, and optical physics\\nAtomic\\nMolecular\\nModern optics\\n\\n\\nElectrodynamics\\nMechanics\\nCondensed matter physics\\nSolid-state physics\\nCrystallography\\n\\n\\n\\n|\\n| Other namespaces | \\n\\nTemplates: {{Relativity}}\\n{{Time travel}}\\nCategories: Topological spaces\\nFiction about physics\\n\\n|\\n| Related | \\n\\nGravity\\nStrong force\\nWeak force\\n\\n|\\n| \\n* v\\n* t\\n* e\\nMajor branches of physics\\n|\\n| --- |\\n| Divisions | \\n\\nPure\\nApplied\\nEngineering\\n\\n\\n\\n|\\n| Approaches | \\n\\nExperimental\\nTheoretical\\nComputational\\n\\n\\n\\n|\\n| Classical | \\n\\nClassical mechanics\\nNewtonian\\nAnalytical\\nCelestial\\nContinuum\\n\\n\\nAcoustics\\nClassical electromagnetism\\nClassical optics\\nRay\\nWave\\n\\n\\nThermodynamics\\nStatistical\\nNon-equilibrium\\n\\n\\n\\n|\\n| Modern | \\n\\nRelativistic mechanics\\nSpecial\\nGeneral\\n\\n\\nNuclear physics\\nParticle physics\\nQuantum mechanics\\nAtomic, molecular, and optical physics\\nAtomic\\nMolecular\\nModern optics\\n\\n\\nCondensed matter physics\\nSolid-state physics\\nCrystallography\\n\\n\\n\\n|\\n| Interdisciplinary | \\n\\nAstrophysics\\nAtmospheric physics\\nBiophysics\\nChemical physics\\nGeophysics\\nMaterials science\\nMathematical physics\\nMedical physics\\nOcean physics\\nQuantum information science\\n\\n|\\n| Related | \\n\\nHistory of physics\\nNobel Prize in Physics\\nPhilosophy of physics\\nPhysics education\\nresearch\\n\\n\\nTimeline of physics discoveries\\n\\n|\\nAuthority control databases: National GermanyJapanCzech Republic\\nRetrieved from \\\"https://en.wikipedia.org/w/index.php?title=Theoretical_physics&oldid=1276330074\\\"\\nCategory:\\n\\nTheoretical physics\\n\\nHidden categories:\\n\\nWebarchive template wayback links\\nArticles with short description\\n\\nShort description is different from Wikidata\\n\\n\\nThis page was last edited on 18 February 2025, at 05:59 (UTC).\\n\\n\\nText is available under the Creative Commons Attribution-ShareAlike 4.0 License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.\\n\\n\\nPrivacy policy\\n\\nAbout Wikipedia\\nDisclaimers\\nContact Wikipedia\\nCode of Conduct\\nDevelopers\\nStatistics\\nCookie statement\\n\\nMobile view\\n\\n\\n\\n\\n\\n\\nSearch\\nSearch\\nToggle the table of contents\\nTheoretical physics\\n\\n77 languages Add topic\", \"images\": []}], \"failed_results\": [], \"response_time\": 0.01}\n", - "==================================\u001b[1m Ai Message \u001b[0m==================================\n", + "==================================\u001B[1m Ai Message \u001B[0m==================================\n", "\n", "Here is a summary of the content from the Wikipedia pages on Albert Einstein and Theoretical Physics:\n", "\n", diff --git a/docs/docs/integrations/tools/tavily_search.ipynb b/docs/docs/integrations/tools/tavily_search.ipynb index 8f6c83e132b..02591f01f1f 100644 --- a/docs/docs/integrations/tools/tavily_search.ipynb +++ b/docs/docs/integrations/tools/tavily_search.ipynb @@ -20,7 +20,7 @@ "### Integration details\n", "| Class | Package | Serializable | [JS support](https://js.langchain.com/docs/integrations/tools/tavily_search) | Package latest |\n", "|:--------------------------------------------------------------|:---------------------------------------------------------------| :---: | :---: | :---: |\n", - "| [TavilySearch](https://github.com/tavily-ai/langchain-tavily) | [langchain-tavily](https://pypi.org/project/langchain-tavily/) | ❌ | ❌ | ![PyPI - Version](https://img.shields.io/pypi/v/langchain-tavily?style=flat-square&label=%20) |\n", + "| [TavilySearch](https://github.com/tavily-ai/langchain-tavily) | [langchain-tavily](https://pypi.org/project/langchain-tavily/) | ✅ | ❌ | ![PyPI - Version](https://img.shields.io/pypi/v/langchain-tavily?style=flat-square&label=%20) |\n", "\n", "### Tool features\n", "| [Returns artifact](/docs/how_to/tool_artifacts/) | Native async | Return data | Pricing |\n", @@ -73,26 +73,36 @@ ] }, { - "cell_type": "markdown", - "id": "1c97218f-f366-479d-8bf7-fe9f2f6df73f", "metadata": {}, + "cell_type": "markdown", "source": [ "## Instantiation\n", "\n", - "Here we show how to instantiate an instance of the Tavily search tools, with" - ] + "Here we show how to instantiate an instance of the Tavily search tool. The tool accepts various parameters to customize the search. After instantiation we invoke the tool with a simple query. This tool allows you to complete search queries using Tavily's Search API endpoint.\n", + "\n", + "Instantiation\n", + "The tool accepts various parameters during instantiation:\n", + "\n", + "- max_results (optional, int): Maximum number of search results to return. Default is 5.\n", + "- topic (optional, str): Category of the search. Can be \"general\", \"news\", or \"finance\". Default is \"general\".\n", + "- include_answer (optional, bool): Include an answer to original query in results. Default is False.\n", + "- include_raw_content (optional, bool): Include cleaned and parsed HTML of each search result. Default is False.\n", + "- include_images (optional, bool): Include a list of query related images in the response. Default is False.\n", + "- include_image_descriptions (optional, bool): Include descriptive text for each image. Default is False.\n", + "- search_depth (optional, str): Depth of the search, either \"basic\" or \"advanced\". Default is \"basic\".\n", + "- time_range (optional, str): The time range back from the current date to filter results - \"day\", \"week\", \"month\", or \"year\". Default is None.\n", + "- include_domains (optional, List[str]): List of domains to specifically include. Default is None.\n", + "- exclude_domains (optional, List[str]): List of domains to specifically exclude. Default is None.\n", + "\n", + "For a comprehensive overview of the available parameters, refer to the [Tavily Search API documentation](https://docs.tavily.com/documentation/api-reference/endpoint/search)" + ], + "id": "72461be913bfaf2b" }, { + "metadata": {}, "cell_type": "code", - "execution_count": 3, - "id": "8b3ddfe9-ca79-494c-a7ab-1f56d9407a64", - "metadata": { - "ExecuteTime": { - "end_time": "2025-03-19T16:44:04.570451Z", - "start_time": "2025-03-19T16:44:04.561713Z" - } - }, "outputs": [], + "execution_count": null, "source": [ "from langchain_tavily import TavilySearch\n", "\n", @@ -108,12 +118,12 @@ " # include_domains=None,\n", " # exclude_domains=None\n", ")" - ] + ], + "id": "dc382e5426394836" }, { - "cell_type": "markdown", - "id": "74147a1a", "metadata": {}, + "cell_type": "markdown", "source": [ "## Invocation\n", "\n", @@ -121,62 +131,21 @@ "\n", "The Tavily search tool accepts the following arguments during invocation:\n", "- `query` (required): A natural language search query\n", - "- The following arguments can also be set during invokation : `include_images`, `search_depth` , `time_range`, `include_domains`, `exclude_domains`, `include_images`\n", + "- The following arguments can also be set during invocation : `include_images`, `search_depth` , `time_range`, `include_domains`, `exclude_domains`, `include_images`\n", "- For reliability and performance reasons, certain parameters that affect response size cannot be modified during invocation: `include_answer` and `include_raw_content`. These limitations prevent unexpected context window issues and ensure consistent results.\n", "\n", "\n", - "NOTE: The optional arguments are available for agents to dynamically set, if you set a argument during instantiation and then invoke the tool with a different value, the tool will use the value you passed during invokation." - ] + "NOTE: The optional arguments are available for agents to dynamically set, if you set an argument during instantiation and then invoke the tool with a different value, the tool will use the value you passed during invocation." + ], + "id": "f997d2733b63f655" }, { - "cell_type": "code", - "execution_count": 4, - "id": "65310a8b-eb0c-4d9e-a618-4f4abe2414fc", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'query': 'What happened at the last wimbledon',\n", - " 'follow_up_questions': None,\n", - " 'answer': None,\n", - " 'images': [],\n", - " 'results': [{'title': \"Andy Murray pulls out of the men's singles draw at his last Wimbledon\",\n", - " 'url': 'https://www.nbcnews.com/news/sports/andy-murray-wimbledon-tennis-singles-draw-rcna159912',\n", - " 'content': \"NBC News Now LONDON — Andy Murray, one of the last decade's most successful male tennis players, has pulled out of the singles tournament at what is almost certain to be his last Wimbledon, his team confirmed Tuesday. Murray, 37, who has won the Wimbledon singles title twice and the U.S Open once, has been battling to be fit to play at the All England Club for weeks. “Unfortunately, despite working incredibly hard on his recovery since his operation just over a week ago, Andy has taken the very difficult decision not to play the singles this year,” his team said in a statement reported by Sky News. The news caps a glittering career on the ATP singles tour, which placed Murray at No. 1 in the world for 41 weeks.\",\n", - " 'score': 0.67527276,\n", - " 'raw_content': None},\n", - " {'title': 'Andy Murray brought to tears by emotional ceremony as Wimbledon ...',\n", - " 'url': 'https://edition.cnn.com/2024/07/05/sport/andy-murray-wimbledon-farewell-ceremony-spt-intl/index.html',\n", - " 'content': 'Andy Murray brought to tears by emotional ceremony as Wimbledon farewell begins with doubles defeat | CNN Football Tennis Golf Motorsport US Sports Olympics Climbing Esports Hockey CNN10 About CNN Andy Murray became emotional when speaking on court following his Wimbledon defeat on Thursday. It was an emotional night for three-time grand slam champion Andy Murray on Thursday, as the 37-year-old’s Wimbledon farewell began with doubles defeat. Following a doubles defeat alongside his brother Jamie on Thursday, Murray was moved to tears after a short ceremony on Centre Court in which a montage of his career played out on big screens. Murray watches on as a video montage of his career highlights plays on the big screens at Wimbledon. CNN10 About CNN',\n", - " 'score': 0.43482184,\n", - " 'raw_content': None},\n", - " {'title': 'Wimbledon - Latest News, Headlines and Entertainment from the BBC',\n", - " 'url': 'https://www.bbc.co.uk/news/topics/c1kr68g26j9t',\n", - " 'content': \"Wimbledon - Latest News, Headlines and Entertainment from the BBC BBC Homepage Search BBC Close menu BBC News BBC Verify World News TV Weather for Wimbledon London London Disabled people share experience of accessible homes London Man's pop-up urinal death may never be explained, family fears London London London London London London London Met PC jailed for assaulting man in hospital bed London London London Man jumped to his death in police station - inquest London Central London YMCA closes after failed injunction Kerr denies 'whiteness as insult' against police Man denies being getaway driver in £1m watch raid About the BBC Contact the BBC BBC emails for you The BBC is not responsible for the content of external sites.\",\n", - " 'score': 0.3916624,\n", - " 'raw_content': None},\n", - " {'title': 'Wimbledon - latest news, breaking stories and comment - The Independent',\n", - " 'url': 'https://www.independent.co.uk/topic/wimbledon',\n", - " 'content': \"Independent Australian Open champion Jannik Sinner's style draws comparisons to Novak Djokovic Patten wins second grand slam doubles title after Australian Open epic Australian Open: Madison Keys can win her first Slam title and stop Aryna Sabalenka's threepeat Novak Djokovic hits back to beat Carlos Alcaraz in Australian Open thriller Australian Open 2025: Carlos Alcaraz and Jannik Sinner have a real rivalry atop men's tennis Australian Open 2025: Carlos Alcaraz and Jannik Sinner have a real rivalry atop men's tennis Australian Open 2025: Cases involving Jannik Sinner and Iga Swiatek make doping a top topic Australian Open 2025: There really isn't much time off in the offseason for tennis players Jd Sports Discount Code\",\n", - " 'score': 0.3539422,\n", - " 'raw_content': None},\n", - " {'title': 'Novak Djokovic loses to Carlos Alcaraz Wimbledon final',\n", - " 'url': 'https://www.wimbledon.com/en_GB/news/articles/2023-07-16/alcaraz_ends_the_djokovic_run.html',\n", - " 'content': 'Password* By joining myWimbledon you are confirming you are happy to receive news and information from The All England Lawn Tennis Club regarding The Club, The Championships and The Grounds via email By joining myWimbledon you are confirming you are happy to receive news and information from The All England Lawn Tennis Club regarding The Club, The Championships and The Grounds via email Please enter your email address to update your password: We have sent details on how to update your password to the email address you provided. A verification email with a link to verify your account has been sent to you. Please enter the code sent to your email address below and click SUBMIT to complete the verification.',\n", - " 'score': 0.23453853,\n", - " 'raw_content': None}],\n", - " 'response_time': 1.43}" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "tool.invoke({\"query\": \"What happened at the last wimbledon\"})" - ] + "cell_type": "code", + "outputs": [], + "execution_count": null, + "source": "tool.invoke({\"query\": \"What happened at the last wimbledon\"})", + "id": "5e75399230ab9fc1" }, { "cell_type": "markdown", @@ -287,21 +256,21 @@ "name": "stdout", "output_type": "stream", "text": [ - "================================\u001b[1m Human Message \u001b[0m=================================\n", + "================================\u001B[1m Human Message \u001B[0m=================================\n", "\n", "What nation hosted the Euro 2024? Include only wikipedia sources.\n", - "==================================\u001b[1m Ai Message \u001b[0m==================================\n", + "==================================\u001B[1m Ai Message \u001B[0m==================================\n", "Tool Calls:\n", " tavily_search (call_yxmR4K2uadsQ8LKoyi8JyoLD)\n", " Call ID: call_yxmR4K2uadsQ8LKoyi8JyoLD\n", " Args:\n", " query: Euro 2024 host nation\n", " include_domains: ['wikipedia.org']\n", - "=================================\u001b[1m Tool Message \u001b[0m=================================\n", + "=================================\u001B[1m Tool Message \u001B[0m=================================\n", "Name: tavily_search\n", "\n", "{\"query\": \"Euro 2024 host nation\", \"follow_up_questions\": null, \"answer\": null, \"images\": [], \"results\": [{\"title\": \"UEFA Euro 2024 - Wikipedia\", \"url\": \"https://en.wikipedia.org/wiki/UEFA_Euro_2024\", \"content\": \"Tournament details Host country Germany Dates 14 June – 14 July Teams 24 Venue(s) 10 (in 10 host cities) Final positions Champions Spain (4th title) Runners-up England Tournament statistics Matches played 51 Goals scored 117 (2.29 per match) Attendance 2,681,288 (52,574 per match) Top scorer(s) Harry Kane Georges Mikautadze Jamal Musiala Cody Gakpo Ivan Schranz Dani Olmo (3 goals each) Best player(s) Rodri Best young player Lamine Yamal ← 2020 2028 → The 2024 UEFA European Football Championship, commonly referred to as UEFA Euro 2024 (stylised as UEFA EURO 2024) or simply Euro 2024, was the 17th UEFA European Championship, the quadrennial international football championship organised by UEFA for the European men's national teams of their member associations. Germany hosted the tournament, which took place from 14 June to 14 July 2024. The tournament involved 24 teams, with Georgia making their European Championship debut. [4] Host nation Germany were eliminated by Spain in the quarter-finals; Spain went on to win the tournament for a record fourth time after defeating England 2–1 in the final.\", \"score\": 0.9104262, \"raw_content\": null}, {\"title\": \"UEFA Euro 2024 - Simple English Wikipedia, the free encyclopedia\", \"url\": \"https://simple.wikipedia.org/wiki/UEFA_Euro_2024\", \"content\": \"The 2024 UEFA European Football Championship, also known as UEFA Euro 2024 or simply Euro 2024, was the 17th edition of the UEFA European Championship. Germany was hosting the tournament. ... The UEFA Executive Committee voted for the host in a secret ballot, with only a simple majority (more than half of the valid votes) required to determine\", \"score\": 0.81418616, \"raw_content\": null}, {\"title\": \"Championnat d'Europe de football 2024 — Wikipédia\", \"url\": \"https://fr.wikipedia.org/wiki/Championnat_d'Europe_de_football_2024\", \"content\": \"Le Championnat d'Europe de l'UEFA de football 2024 est la 17 e édition du Championnat d'Europe de football, communément abrégé en Euro 2024, compétition organisée par l'UEFA et rassemblant les meilleures équipes nationales masculines européennes. L'Allemagne est désignée pays organisateur de la compétition le 27 septembre 2018. C'est la troisième fois que des matches du Championnat\", \"score\": 0.8055255, \"raw_content\": null}, {\"title\": \"UEFA Euro 2024 bids - Wikipedia\", \"url\": \"https://en.wikipedia.org/wiki/UEFA_Euro_2024_bids\", \"content\": \"The bidding process of UEFA Euro 2024 ended on 27 September 2018 in Nyon, Switzerland, when Germany was announced to be the host. [1] Two bids came before the deadline, 3 March 2017, which were Germany and Turkey as single bids. ... Press agencies revealed on 24 October 2013, that the European football governing body UEFA would have decided on\", \"score\": 0.7882741, \"raw_content\": null}, {\"title\": \"2024 UEFA European Under-19 Championship - Wikipedia\", \"url\": \"https://en.wikipedia.org/wiki/2024_UEFA_European_Under-19_Championship\", \"content\": \"The 2024 UEFA European Under-19 Championship (also known as UEFA Under-19 Euro 2024) was the 21st edition of the UEFA European Under-19 Championship (71st edition if the Under-18 and Junior eras are included), the annual international youth football championship organised by UEFA for the men's under-19 national teams of Europe. Northern Ireland hosted the tournament from 15 to 28 July 2024.\", \"score\": 0.7783298, \"raw_content\": null}], \"response_time\": 1.67}\n", - "==================================\u001b[1m Ai Message \u001b[0m==================================\n", + "==================================\u001B[1m Ai Message \u001B[0m==================================\n", "\n", "The nation that hosted Euro 2024 was Germany. You can find more information on the [Wikipedia page for UEFA Euro 2024](https://en.wikipedia.org/wiki/UEFA_Euro_2024).\n" ]