OpenSearch helps develop search services in different search scenarios, including e-commerce, O2O, multimedia, the content industry, communities and forums, and big data query in enterprises.ğŸ“„ï¸� Amazon API GatewayAmazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. APIs act as the "front door" for applications to access data, business logic, or functionality from your backend services. Using API Gateway, you can create RESTful APIs and WebSocket APIs that enable real-time two-way communication applications. API Gateway supports containerized and serverless workloads, as well as web applications.ğŸ“„ï¸� AnalyticDBThis page covers how to use the AnalyticDB ecosystem within LangChain.ğŸ“„ï¸� AnnoyAnnoy (Approximate Nearest Neighbors Oh Yeah) is a C++ library with Python bindings to search for points in space that are close to a given query point. It also creates large read-only file-based data structures that are mmapped into memory so that many processes may share the same data.ğŸ“„ï¸� AnyscaleThis page covers how to use the Anyscale ecosystem within LangChain.ğŸ“„ï¸� ApifyThis page covers how to use Apify within LangChain.ğŸ“„ï¸� ArangoDBArangoDB is a scalable graph database system to drive value from connected data, faster. Native graphs, an integrated search engine, and JSON support, via a single query language. ArangoDB runs on-prem, in the cloud â€“ anywhere.ğŸ“„ï¸� ArgillaArgilla - Open-source data platform for LLMsğŸ“„ï¸� ArthurArthur is a model monitoring and observability


ArthurArthur is a model monitoring and observability platform.ğŸ“„ï¸� ArxivarXiv is an open-access archive for 2 million scholarly articles in the fields of physics,ğŸ“„ï¸� AtlasDBThis page covers how to use Nomic's Atlas ecosystem within LangChain.ğŸ“„ï¸� AwaDBAwaDB is an AI Native database for the search and storage of embedding vectors used by LLM Applications.ğŸ“„ï¸� AWS S3 DirectoryAmazon Simple Storage Service (Amazon S3) is an object storage service.ğŸ“„ï¸� AZLyricsAZLyrics is a large, legal, every day growing collection of lyrics.ğŸ“„ï¸� Azure Blob StorageAzure Blob Storage is Microsoft's object storage solution for the cloud. Blob Storage is optimized for storing massive amounts of unstructured data. Unstructured data is data that doesn't adhere to a particular data model or definition, such as text or binary data.ğŸ“„ï¸� Azure Cognitive SearchAzure Cognitive Search (formerly known as Azure Search) is a cloud search service that gives developers infrastructure, APIs, and tools for building a rich search experience over private, heterogeneous content in web, mobile, and enterprise applications.ğŸ“„ï¸� Azure OpenAIMicrosoft Azure, often referred to as Azure is a cloud computing platform run by Microsoft, which offers access, management, and development of applications and services through global data centers. It provides a range of capabilities, including software as a service (SaaS), platform as a service (PaaS), and infrastructure as a service (IaaS). Microsoft Azure supports many programming languages, tools, and frameworks, including Microsoft-specific and third-party software and systems.ğŸ“„ï¸� BananaThis page covers how to use the Banana ecosystem within


BananaThis page covers how to use the Banana ecosystem within LangChain.ğŸ“„ï¸� BasetenLearn how to use LangChain with models deployed on Baseten.ğŸ“„ï¸� BeamThis page covers how to use Beam within LangChain.ğŸ“„ï¸� BedrockAmazon Bedrock is a fully managed service that makes FMs from leading AI startups and Amazon available via an API, so you can choose from a wide range of FMs to find the model that is best suited for your use case.ğŸ“„ï¸� BiliBiliBilibili is one of the most beloved long-form video sites in China.ğŸ“„ï¸� BlackboardBlackboard Learn (previously the Blackboard Learning Management System)ğŸ“„ï¸� Brave SearchBrave Search is a search engine developed by Brave Software.ğŸ“„ï¸� CassandraApache CassandraÂ® is a free and open-source, distributed, wide-columnğŸ“„ï¸� CerebriumAIThis page covers how to use the CerebriumAI ecosystem within LangChain.ğŸ“„ï¸� ChaindeskChaindesk is an open source document retrieval platform that helps to connect your personal data with Large Language Models.ğŸ“„ï¸� ChromaChroma is a database for building AI applications with embeddings.ğŸ“„ï¸� ClarifaiClarifai is one of first deep learning platforms having been founded in 2013. Clarifai provides an AI platform with the full AI lifecycle for data exploration, data labeling, model training, evaluation and inference around images, video, text and audio data. In the LangChain ecosystem, as far as we're aware, Clarifai is the only provider that supports LLMs, embeddings and a


we're aware, Clarifai is the only provider that supports LLMs, embeddings and a vector store in one production scale platform, making it an excellent choice to operationalize your LangChain implementations.ğŸ“„ï¸� ClearMLClearML is a ML/DL development and production suite, it contains 5 main modules:ğŸ“„ï¸� CnosDBCnosDB is an open source distributed time series database with high performance, high compression rate and high ease of use.ğŸ“„ï¸� CohereCohere is a Canadian startup that provides natural language processing modelsğŸ“„ï¸� College ConfidentialCollege Confidential gives information on 3,800+ colleges and universities.ğŸ“„ï¸� CometIn this guide we will demonstrate how to track your Langchain Experiments, Evaluation Metrics, and LLM Sessions with Comet.ğŸ“„ï¸� ConfluenceConfluence is a wiki collaboration platform that saves and organizes all of the project-related material. Confluence is a knowledge base that primarily handles content management activities.ğŸ“„ï¸� C TransformersThis page covers how to use the C Transformers library within LangChain.ğŸ“„ï¸� DatabricksThis notebook covers how to connect to the Databricks runtimes and Databricks SQL using the SQLDatabase wrapper of LangChain.ğŸ“„ï¸� Datadog Tracingddtrace is a Datadog application performance monitoring (APM) library which provides an integration to monitor your LangChain application.ğŸ“„ï¸� Datadog LogsDatadog is a monitoring and analytics platform for cloud-scale applications.ğŸ“„ï¸� DataForSEOThis page provides instructions on how to use the DataForSEO search APIs within


DataForSEOThis page provides instructions on how to use the DataForSEO search APIs within LangChain.ğŸ“„ï¸� DeepInfraThis page covers how to use the DeepInfra ecosystem within LangChain.ğŸ“„ï¸� Deep LakeThis page covers how to use the Deep Lake ecosystem within LangChain.ğŸ“„ï¸� DiffbotDiffbot is a service to read web pages. Unlike traditional web scraping tools,ğŸ“„ï¸� DiscordDiscord is a VoIP and instant messaging social platform. Users have the ability to communicateğŸ“„ï¸� DocugamiDocugami converts business documents into a Document XML Knowledge Graph, generating forestsğŸ“„ï¸� DuckDBDuckDB is an in-process SQL OLAP database management system.ğŸ“„ï¸� ElasticsearchElasticsearch is a distributed, RESTful search and analytics engine.ğŸ“„ï¸� EverNoteEverNote is intended for archiving and creating notes in which photos, audio and saved web content can be embedded. Notes are stored in virtual "notebooks" and can be tagged, annotated, edited, searched, and exported.ğŸ“„ï¸� Facebook ChatMessenger) is an American proprietary instant messaging app andğŸ“„ï¸� FigmaFigma is a collaborative web application for interface design.ğŸ“„ï¸� FlyteFlyte is an open-source orchestrator that facilitates building production-grade data and ML pipelines.ğŸ“„ï¸� ForefrontAIThis page covers how to use the ForefrontAI ecosystem within LangChain.ğŸ“„ï¸� GitGit is a distributed version control system that tracks changes in any set of computer files, usually used for coordinating work among programmers collaboratively developing source code during


in any set of computer files, usually used for coordinating work among programmers collaboratively developing source code during software development.ğŸ“„ï¸� GitBookGitBook is a modern documentation platform where teams can document everything from products to internal knowledge bases and APIs.ğŸ“„ï¸� GoldenGolden provides a set of natural language APIs for querying and enrichment using the Golden Knowledge Graph e.g. queries such as: Products from OpenAI, Generative ai companies with series a funding, and rappers who invest can be used to retrieve relevant structured data about relevant entities.ğŸ“„ï¸� Google BigQueryGoogle BigQuery is a serverless and cost-effective enterprise data warehouse that works across clouds and scales with your data.ğŸ“„ï¸� Google Cloud StorageGoogle Cloud Storage is a managed service for storing unstructured data.ğŸ“„ï¸� Google DriveGoogle Drive is a file storage and synchronization service developed by Google.ğŸ“„ï¸� Google SearchThis page covers how to use the Google Search API within LangChain.ğŸ“„ï¸� Google SerperThis page covers how to use the Serper Google Search API within LangChain. Serper is a low-cost Google Search API that can be used to add answer box, knowledge graph, and organic results data from Google Search.ğŸ“„ï¸� GooseAIThis page covers how to use the GooseAI ecosystem within LangChain.ğŸ“„ï¸� GPT4AllThis page covers how to use the GPT4All wrapper within LangChain. The tutorial is divided into two parts: installation and setup, followed by usage with an example.ğŸ“„ï¸� GraphsignalThis page covers how to use Graphsignal to trace and monitor LangChain. Graphsignal enables full visibility into your application. It provides latency breakdowns by


and monitor LangChain. Graphsignal enables full visibility into your application. It provides latency breakdowns by chains and tools, exceptions with full context, data monitoring, compute/GPU utilization, OpenAI cost analytics, and more.ğŸ“„ï¸� GrobidThis page covers how to use the Grobid to parse articles for LangChain.ğŸ“„ï¸� GutenbergProject Gutenberg is an online library of free eBooks.ğŸ“„ï¸� Hacker NewsHacker News (sometimes abbreviated as HN) is a social newsğŸ“„ï¸� Hazy ResearchThis page covers how to use the Hazy Research ecosystem within LangChain.ğŸ“„ï¸� HeliconeThis page covers how to use the Helicone ecosystem within LangChain.ğŸ“„ï¸� HologresHologres is a unified real-time data warehousing service developed by Alibaba Cloud. You can use Hologres to write, update, process, and analyze large amounts of data in real time.ğŸ“„ï¸� Hugging FaceThis page covers how to use the Hugging Face ecosystem (including the Hugging Face Hub) within LangChain.ğŸ“„ï¸� iFixitiFixit is the largest, open repair community on the web. The site contains nearly 100kğŸ“„ï¸� IMSDbIMSDb is the Internet Movie Script Database.ğŸ“„ï¸� InfinoInfino is an open-source observability platform that stores both metrics and application logs together.ğŸ“„ï¸� JinaThis page covers how to use the Jina ecosystem within LangChain.ğŸ“„ï¸� LanceDBThis page covers how to use LanceDB within LangChain.ğŸ“„ï¸� LangChain Decorators


use LanceDB within LangChain.ğŸ“„ï¸� LangChain Decorators âœ¨lanchchain decorators is a layer on the top of LangChain that provides syntactic sugar ğŸ� for writing custom langchain prompts and chainsğŸ“„ï¸� Llama.cppThis page covers how to use llama.cpp within LangChain.ğŸ“„ï¸� MarqoThis page covers how to use the Marqo ecosystem within LangChain.ğŸ“„ï¸� MediaWikiDumpMediaWiki XML Dumps contain the content of a wikiğŸ“„ï¸� MetalThis page covers how to use Metal within LangChain.ğŸ“„ï¸� Microsoft OneDriveMicrosoft OneDrive (formerly SkyDrive) is a file-hosting service operated by Microsoft.ğŸ“„ï¸� Microsoft PowerPointMicrosoft PowerPoint is a presentation program by Microsoft.ğŸ“„ï¸� Microsoft WordMicrosoft Word is a word processor developed by Microsoft.ğŸ“„ï¸� MilvusThis page covers how to use the Milvus ecosystem within LangChain.ğŸ“„ï¸� MLflow AI GatewayThe MLflow AI Gateway service is a powerful tool designed to streamline the usage and management of various large language model (LLM) providers, such as OpenAI and Anthropic, within an organization. It offers a high-level interface that simplifies the interaction with these services by providing a unified endpoint to handle specific LLM related requests. See the MLflow AI Gateway documentation for more details.ğŸ“„ï¸� MLflowThis notebook goes over how to track your LangChain experiments into your MLflow ServerğŸ“„ï¸� ModalThis page covers how to use the Modal ecosystem to run LangChain custom


ModalThis page covers how to use the Modal ecosystem to run LangChain custom LLMs.ğŸ“„ï¸� ModelScopeThis page covers how to use the modelscope ecosystem within LangChain.ğŸ“„ï¸� Modern TreasuryModern Treasury simplifies complex payment operations. It is a unified platform to power products and processes that move money.ğŸ“„ï¸� MomentoMomento Cache is the world's first truly serverless caching service. It provides instant elasticity, scale-to-zeroğŸ“„ï¸� MotherduckMotherduck is a managed DuckDB-in-the-cloud service.ğŸ“„ï¸� MyScaleThis page covers how to use MyScale vector database within LangChain.ğŸ“„ï¸� NLPCloudThis page covers how to use the NLPCloud ecosystem within LangChain.ğŸ“„ï¸� Notion DBNotion is a collaboration platform with modified Markdown support that integrates kanbanğŸ“„ï¸� ObsidianObsidian is a powerful and extensible knowledge baseğŸ“„ï¸� OpenAIOpenAI is American artificial intelligence (AI) research laboratoryğŸ“„ï¸� OpenLLMThis page demonstrates how to use OpenLLMğŸ“„ï¸� OpenSearchThis page covers how to use the OpenSearch ecosystem within LangChain.ğŸ“„ï¸� OpenWeatherMapOpenWeatherMap provides all essential weather data for a specific location:ğŸ“„ï¸� PetalsThis page covers how to use the Petals ecosystem within LangChain.ğŸ“„ï¸� PGVectorThis page covers how to use the Postgres PGVector ecosystem within LangChainğŸ“„ï¸� PineconeThis page covers how to use the Pinecone ecosystem within


PineconeThis page covers how to use the Pinecone ecosystem within LangChain.ğŸ“„ï¸� PipelineAIThis page covers how to use the PipelineAI ecosystem within LangChain.ğŸ—ƒï¸� Portkey1 itemsğŸ“„ï¸� PredibaseLearn how to use LangChain with models on Predibase.ğŸ“„ï¸� Prediction GuardThis page covers how to use the Prediction Guard ecosystem within LangChain.ğŸ“„ï¸� PromptLayerThis page covers how to use PromptLayer within LangChain.ğŸ“„ï¸� PsychicPsychic is a platform for integrating with SaaS tools like Notion, Zendesk,ğŸ“„ï¸� QdrantThis page covers how to use the Qdrant ecosystem within LangChain.ğŸ“„ï¸� Ray ServeRay Serve is a scalable model serving library for building online inference APIs. Serve is particularly well suited for system composition, enabling you to build a complex inference service consisting of multiple chains and business logic all in Python code.ğŸ“„ï¸� RebuffRebuff is a self-hardening prompt injection detector.ğŸ“„ï¸� RedditReddit is an American social news aggregation, content rating, and discussion website.ğŸ“„ï¸� RedisThis page covers how to use the Redis ecosystem within LangChain.ğŸ“„ï¸� ReplicateThis page covers how to run models on Replicate within LangChain.ğŸ“„ï¸� RoamROAM is a note-taking tool for networked thought, designed to create a personal knowledge base.ğŸ“„ï¸� RocksetRockset is a real-time analytics database service for serving low latency, high concurrency analytical queries at scale. It builds a Converged


database service for serving low latency, high concurrency analytical queries at scale. It builds a Converged Indexâ„¢ on structured and semi-structured data with an efficient store for vector embeddings. Its support for running SQL on schemaless data makes it a perfect choice for running vector search with metadata filters.ğŸ“„ï¸� RunhouseThis page covers how to use the Runhouse ecosystem within LangChain.ğŸ“„ï¸� RWKV-4This page covers how to use the RWKV-4 wrapper within LangChain.ğŸ“„ï¸� SageMaker EndpointAmazon SageMaker is a system that can build, train, and deploy machine learning (ML) models with fully managed infrastructure, tools, and workflows.ğŸ“„ï¸� SearxNG Search APIThis page covers how to use the SearxNG search API within LangChain.ğŸ“„ï¸� SerpAPIThis page covers how to use the SerpAPI search APIs within LangChain.ğŸ“„ï¸� Shale ProtocolShale Protocol provides production-ready inference APIs for open LLMs. It's a Plug & Play API as it's hosted on a highly scalable GPU cloud infrastructure.ğŸ“„ï¸� SingleStoreDBSingleStoreDB is a high-performance distributed SQL database that supports deployment both in the cloud and on-premises. It provides vector storage, and vector functions including dotproduct and euclideandistance, thereby supporting AI applications that require text similarity matching.ğŸ“„ï¸� scikit-learnscikit-learn is an open source collection of machine learning algorithms,ğŸ“„ï¸� SlackSlack is an instant messaging program.ğŸ“„ï¸� spaCyspaCy is an open-source software library for advanced natural language processing, written in the


spaCyspaCy is an open-source software library for advanced natural language processing, written in the programming languages Python and Cython.ğŸ“„ï¸� SpreedlySpreedly is a service that allows you to securely store credit cards and use them to transact against any number of payment gateways and third party APIs. It does this by simultaneously providing a card tokenization/vault service as well as a gateway and receiver integration service. Payment methods tokenized by Spreedly are stored at Spreedly, allowing you to independently store a card and then pass that card to different end points based on your business requirements.ğŸ“„ï¸� StarRocksStarRocks is a High-Performance Analytical Database.ğŸ“„ï¸� StochasticAIThis page covers how to use the StochasticAI ecosystem within LangChain.ğŸ“„ï¸� StripeStripe is an Irish-American financial services and software as a service (SaaS) company. It offers payment-processing software and application programming interfaces for e-commerce websites and mobile applications.ğŸ“„ï¸� TairThis page covers how to use the Tair ecosystem within LangChain.ğŸ“„ï¸� TelegramTelegram Messenger is a globally accessible freemium, cross-platform, encrypted, cloud-based and centralized instant messaging service. The application also provides optional end-to-end encrypted chats and video calling, VoIP, file sharing and several other features.ğŸ“„ï¸� TigrisTigris is an open source Serverless NoSQL Database and Search Platform designed to simplify building high-performance vector search applications.ğŸ“„ï¸� 2Markdown2markdown service transforms website content into structured markdown files.ğŸ“„ï¸� TrelloTrello is a web-based project management and collaboration tool that allows individuals and teams to organize and track


is a web-based project management and collaboration tool that allows individuals and teams to organize and track their tasks and projects. It provides a visual interface known as a "board" where users can create lists and cards to represent their tasks and activities.ğŸ“„ï¸� TruLensThis page covers how to use TruLens to evaluate and track LLM apps built on langchain.ğŸ“„ï¸� TwitterTwitter is an online social media and social networking service.ğŸ“„ï¸� TypesenseTypesense is an open source, in-memory search engine, that you can eitherğŸ“„ï¸� UnstructuredThe unstructured package fromğŸ—ƒï¸� Vectara2 itemsğŸ“„ï¸� VespaVespa is a fully featured search engine and vector database.ğŸ“„ï¸� Weights & BiasesThis notebook goes over how to track your LangChain experiments into one centralized Weights and Biases dashboard. To learn more about prompt engineering and the callback please refer to this Report which explains both alongside the resultant dashboards you can expect to see.ğŸ“„ï¸� WeatherOpenWeatherMap is an open source weather service provider.ğŸ“„ï¸� WeaviateThis page covers how to use the Weaviate ecosystem within LangChain.ğŸ“„ï¸� WhatsAppWhatsApp (also called WhatsApp Messenger) is a freeware, cross-platform, centralized instant messaging (IM) and voice-over-IP (VoIP) service. It allows users to send text and voice messages, make voice and video calls, and share images, documents, user locations, and other content.ğŸ“„ï¸� WhyLabsWhyLabs is an observability platform designed to monitor data pipelines and ML applications for data quality regressions, data


is an observability platform designed to monitor data pipelines and ML applications for data quality regressions, data drift, and model performance degradation. Built on top of an open-source package called whylogs, the platform enables Data Scientists and Engineers to:ğŸ“„ï¸� WikipediaWikipedia is a multilingual free online encyclopedia written and maintained by a community of volunteers, known as Wikipedians, through open collaboration and using a wiki-based editing system called MediaWiki. Wikipedia is the largest and most-read reference work in history.ğŸ“„ï¸� Wolfram AlphaWolframAlpha is an answer engine developed by Wolfram Research.ğŸ“„ï¸� WriterThis page covers how to use the Writer ecosystem within LangChain.ğŸ“„ï¸� Yeager.aiThis page covers how to use Yeager.ai to generate LangChain tools and agents.ğŸ“„ï¸� YouTubeYouTube is an online video sharing and social media platform by Google.ğŸ“„ï¸� ZepZep - A long-term memory store for LLM applications.ğŸ“„ï¸� ZillizZilliz Cloud is a fully managed service on cloud for LF AI MilvusÂ®,PreviousZillizNextWandB TracingCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Shale Protocol | ğŸ¦œï¸�ğŸ”— Langchain


Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsVector storesGrouped by providerWandB TracingAI21 LabsAimAirbyteAirtableAleph AlphaAlibaba Cloud OpensearchAmazon API GatewayAnalyticDBAnnoyAnyscaleApifyArangoDBArgillaArthurArxivAtlasDBAwaDBAWS S3 DirectoryAZLyricsAzure Blob StorageAzure Cognitive SearchAzure OpenAIBananaBasetenBeamBedrockBiliBiliBlackboardBrave SearchCassandraCerebriumAIChaindeskChromaClarifaiClearMLCnosDBCohereCollege ConfidentialCometConfluenceC TransformersDatabricksDatadog TracingDatadog LogsDataForSEODeepInfraDeep LakeDiffbotDiscordDocugamiDuckDBElasticsearchEverNoteFacebook ChatFigmaFlyteForefrontAIGitGitBookGoldenGoogle BigQueryGoogle Cloud StorageGoogle DriveGoogle SearchGoogle SerperGooseAIGPT4AllGraphsignalGrobidGutenbergHacker NewsHazy ResearchHeliconeHologresHugging FaceiFixitIMSDbInfinoJinaLanceDBLangChain Decorators âœ¨Llama.cppMarqoMediaWikiDumpMetalMicrosoft OneDriveMicrosoft PowerPointMicrosoft WordMilvusMLflow AI GatewayMLflowModalModelScopeModern TreasuryMomentoMotherduckMyScaleNLPCloudNotion DBObsidianOpenAIOpenLLMOpenSearchOpenWeatherMapPetalsPGVectorPineconePipelineAIPortkeyPredibasePrediction GuardPromptLayerPsychicQdrantRay ServeRebuffRedditRedisReplicateRoamRocksetRunhouseRWKV-4SageMaker EndpointSearxNG Search APISerpAPIShale


EndpointSearxNG Search APISerpAPIShale ProtocolSingleStoreDBscikit-learnSlackspaCySpreedlyStarRocksStochasticAIStripeTairTelegramTigris2MarkdownTrelloTruLensTwitterTypesenseUnstructuredVectaraVespaWeights & BiasesWeatherWeaviateWhatsAppWhyLabsWikipediaWolfram AlphaWriterYeager.aiYouTubeZepZillizIntegrationsGrouped by providerShale ProtocolOn this pageShale ProtocolShale Protocol provides production-ready inference APIs for open LLMs. It's a Plug & Play API as it's hosted on a highly scalable GPU cloud infrastructure. Our free tier supports up to 1K daily requests per key as we want to eliminate the barrier for anyone to start building genAI apps with LLMs. With Shale Protocol, developers/researchers can create apps and explore the capabilities of open LLMs at no cost.This page covers how Shale-Serve API can be incorporated with LangChain.As of June 2023, the API supports Vicuna-13B by default. We are going to support more LLMs such as Falcon-40B in future releases. How toâ€‹1. Find the link to our Discord on https://shaleprotocol.com. Generate an API key through the "Shale Bot" on our Discord. No credit card is required and no free trials. It's a forever free tier with 1K limit per day per API key.â€‹2. Use https://shale.live/v1 as OpenAI API drop-in replacementâ€‹For examplefrom langchain.llms import OpenAIfrom langchain import PromptTemplate, LLMChainimport osos.environ['OPENAI_API_BASE'] = "https://shale.live/v1"os.environ['OPENAI_API_KEY'] = "ENTER YOUR API KEY"llm = OpenAI()template = """Question:


= "ENTER YOUR API KEY"llm = OpenAI()template = """Question: {question}# Answer: Let's think step by step."""prompt = PromptTemplate(template=template, input_variables=["question"])llm_chain = LLMChain(prompt=prompt, llm=llm)question = "What NFL team won the Super Bowl in the year Justin Beiber was born?"llm_chain.run(question)PreviousSerpAPINextSingleStoreDBHow to1. Find the link to our Discord on https://shaleprotocol.com. Generate an API key through the "Shale Bot" on our Discord. No credit card is required and no free trials. It's a forever free tier with 1K limit per day per API key.2. Use https://shale.live/v1 as OpenAI API drop-in replacementCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Jina | ğŸ¦œï¸�ğŸ”— Langchain


EndpointSearxNG Search APISerpAPIShale ProtocolSingleStoreDBscikit-learnSlackspaCySpreedlyStarRocksStochasticAIStripeTairTelegramTigris2MarkdownTrelloTruLensTwitterTypesenseUnstructuredVectaraVespaWeights & BiasesWeatherWeaviateWhatsAppWhyLabsWikipediaWolfram AlphaWriterYeager.aiYouTubeZepZillizIntegrationsGrouped by providerJinaOn this pageJinaThis page covers how to use the Jina ecosystem within LangChain.


It is broken into two parts: installation and setup, and then references to specific Jina wrappers.Installation and Setupâ€‹Install the Python SDK with pip install jinaGet a Jina AI Cloud auth token from here and set it as an environment variable (JINA_AUTH_TOKEN)Wrappersâ€‹Embeddingsâ€‹There exists a Jina Embeddings wrapper, which you can access with from langchain.embeddings import JinaEmbeddingsFor a more detailed walkthrough of this, see this notebookDeploymentâ€‹Langchain-serve, powered by Jina, helps take LangChain apps to production with easy to use REST/WebSocket APIs and Slack bots. Usageâ€‹Install the package from PyPI. pip install langchain-serveWrap your LangChain app with the @serving decorator. # app.pyfrom lcserve import serving@servingdef ask(input: str) -> str:    from langchain import LLMChain, OpenAI    from langchain.agents import AgentExecutor, ZeroShotAgent        tools = [...] # list of tools    prompt = ZeroShotAgent.create_prompt(        tools, input_variables=["input", "agent_scratchpad"],    )    llm_chain = LLMChain(llm=OpenAI(temperature=0), prompt=prompt)    agent = ZeroShotAgent(        llm_chain=llm_chain, allowed_tools=[tool.name for tool in tools]    )    agent_executor = AgentExecutor.from_agent_and_tools(        agent=agent,         tools=tools,         verbose=True,    )    return agent_executor.run(input)Deploy on Jina AI Cloud with lc-serve


)    return agent_executor.run(input)Deploy on Jina AI Cloud with lc-serve deploy jcloud app. Once deployed, we can send a POST request to the API endpoint to get a response.curl -X 'POST' 'https://<your-app>.wolf.jina.ai/ask' \ -d '{  "input": "Your Quesion here?",  "envs": {     "OPENAI_API_KEY": "sk-***"  }}'You can also self-host the app on your infrastructure with Docker-compose or Kubernetes. See here for more details.Langchain-serve also allows to deploy the apps with WebSocket APIs and Slack Bots both on Jina AI Cloud or self-hosted infrastructure.PreviousInfinoNextLanceDBInstallation and SetupWrappersEmbeddingsDeploymentUsageCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


SerpAPI | ğŸ¦œï¸�ğŸ”— Langchain


EndpointSearxNG Search APISerpAPIShale ProtocolSingleStoreDBscikit-learnSlackspaCySpreedlyStarRocksStochasticAIStripeTairTelegramTigris2MarkdownTrelloTruLensTwitterTypesenseUnstructuredVectaraVespaWeights & BiasesWeatherWeaviateWhatsAppWhyLabsWikipediaWolfram AlphaWriterYeager.aiYouTubeZepZillizIntegrationsGrouped by providerSerpAPIOn this pageSerpAPIThis page covers how to use the SerpAPI search APIs within LangChain.


It is broken into two parts: installation and setup, and then references to the specific SerpAPI wrapper.Installation and Setupâ€‹Install requirements with pip install google-search-resultsGet a SerpAPI api key and either set it as an environment variable (SERPAPI_API_KEY)Wrappersâ€‹Utilityâ€‹There exists a SerpAPI utility which wraps this API. To import this utility:from langchain.utilities import SerpAPIWrapperFor a more detailed walkthrough of this wrapper, see this notebook.Toolâ€‹You can also easily load this wrapper as a Tool (to use with an Agent).
You can do this with:from langchain.agents import load_toolstools = load_tools(["serpapi"])For more information on this, see this pagePreviousSearxNG Search APINextShale ProtocolInstallation and SetupWrappersUtilityToolCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


ClearML | ğŸ¦œï¸�ğŸ”— Langchain


EndpointSearxNG Search APISerpAPIShale ProtocolSingleStoreDBscikit-learnSlackspaCySpreedlyStarRocksStochasticAIStripeTairTelegramTigris2MarkdownTrelloTruLensTwitterTypesenseUnstructuredVectaraVespaWeights & BiasesWeatherWeaviateWhatsAppWhyLabsWikipediaWolfram AlphaWriterYeager.aiYouTubeZepZillizIntegrationsGrouped by providerClearMLOn this pageClearMLClearML is a ML/DL development and production suite, it contains 5 main modules:Experiment Manager - Automagical experiment tracking, environments and resultsMLOps - Orchestration, Automation & Pipelines solution for ML/DL jobs (K8s / Cloud / bare-metal)Data-Management - Fully differentiable data management & version control solution on top of object-storage (S3 / GS / Azure / NAS)Model-Serving - cloud-ready Scalable model serving solution!


Deploy new model endpoints in under 5 minutes
Includes optimized GPU serving support backed by Nvidia-Triton


with out-of-the-box Model MonitoringFire Reports - Create and share rich MarkDown documents supporting embeddable online contentIn order to properly keep track of your langchain experiments and their results, you can enable the ClearML integration. We use the ClearML Experiment Manager that neatly tracks and organizes all your experiment runs.Installation and Setupâ€‹pip install clearmlpip install pandaspip install textstatpip install spacypython -m spacy download en_core_web_smGetting API Credentialsâ€‹We'll be using quite some APIs in this notebook, here is a list and where to get them:ClearML: https://app.clear.ml/settings/workspace-configurationOpenAI: https://platform.openai.com/account/api-keysSerpAPI (google search): https://serpapi.com/dashboardimport osos.environ["CLEARML_API_ACCESS_KEY"] = ""os.environ["CLEARML_API_SECRET_KEY"] = ""os.environ["OPENAI_API_KEY"] = ""os.environ["SERPAPI_API_KEY"] = ""Callbacksâ€‹from langchain.callbacks import ClearMLCallbackHandlerfrom datetime import datetimefrom langchain.callbacks import StdOutCallbackHandlerfrom langchain.llms import OpenAI# Setup and use the ClearML Callbackclearml_callback = ClearMLCallbackHandler(    task_type="inference",    project_name="langchain_callback_demo",    task_name="llm",    tags=["test"],    # Change the following parameters based on the amount of detail you want tracked    visualize=True,    complexity_metrics=True,    stream_logs=True,)callbacks = [StdOutCallbackHandler(), clearml_callback]# Get the OpenAI model ready to gollm = OpenAI(temperature=0, callbacks=callbacks)    The clearml callback is currently in beta and is subject to change based on updates to `langchain`. Please report any issues to


in beta and is subject to change based on updates to `langchain`. Please report any issues to https://github.com/allegroai/clearml/issues with the tag `langchain`.Scenario 1: Just an LLMâ€‹First, let's just run a single LLM a few times and capture the resulting prompt-answer conversation in ClearML# SCENARIO 1 - LLMllm_result = llm.generate(["Tell me a joke", "Tell me a poem"] * 3)# After every generation run, use flush to make sure all the metrics# prompts and other output are properly saved separatelyclearml_callback.flush_tracker(langchain_asset=llm, name="simple_sequential")    {'action': 'on_llm_start', 'name': 'OpenAI', 'step': 3, 'starts': 2, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'prompts': 'Tell me a joke'}    {'action': 'on_llm_start', 'name': 'OpenAI', 'step': 3, 'starts': 2, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'prompts': 'Tell me a poem'}    {'action': 'on_llm_start', 'name':


me a poem'}    {'action': 'on_llm_start', 'name': 'OpenAI', 'step': 3, 'starts': 2, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'prompts': 'Tell me a joke'}    {'action': 'on_llm_start', 'name': 'OpenAI', 'step': 3, 'starts': 2, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'prompts': 'Tell me a poem'}    {'action': 'on_llm_start', 'name': 'OpenAI', 'step': 3, 'starts': 2, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'prompts': 'Tell me a joke'}    {'action': 'on_llm_start', 'name': 'OpenAI', 'step': 3, 'starts': 2, 'ends': 1,


'step': 3, 'starts': 2, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'prompts': 'Tell me a poem'}    {'action': 'on_llm_end', 'token_usage_prompt_tokens': 24, 'token_usage_completion_tokens': 138, 'token_usage_total_tokens': 162, 'model_name': 'text-davinci-003', 'step': 4, 'starts': 2, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'text': '\n\nQ: What did the fish say when it hit the wall?\nA: Dam!', 'generation_info_finish_reason': 'stop', 'generation_info_logprobs': None, 'flesch_reading_ease': 109.04, 'flesch_kincaid_grade': 1.3, 'smog_index': 0.0, 'coleman_liau_index': -1.24, 'automated_readability_index': 0.3, 'dale_chall_readability_score': 5.5, 'difficult_words': 0, 'linsear_write_formula': 5.5, 'gunning_fog': 5.2, 'text_standard': '5th and


'gunning_fog': 5.2, 'text_standard': '5th and 6th grade', 'fernandez_huerta': 133.58, 'szigriszt_pazos': 131.54, 'gutierrez_polini': 62.3, 'crawford': -0.2, 'gulpease_index': 79.8, 'osman': 116.91}    {'action': 'on_llm_end', 'token_usage_prompt_tokens': 24, 'token_usage_completion_tokens': 138, 'token_usage_total_tokens': 162, 'model_name': 'text-davinci-003', 'step': 4, 'starts': 2, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'text': '\n\nRoses are red,\nViolets are blue,\nSugar is sweet,\nAnd so are you.', 'generation_info_finish_reason': 'stop', 'generation_info_logprobs': None, 'flesch_reading_ease': 83.66, 'flesch_kincaid_grade': 4.8, 'smog_index': 0.0, 'coleman_liau_index': 3.23, 'automated_readability_index': 3.9, 'dale_chall_readability_score': 6.71, 'difficult_words': 2, 'linsear_write_formula': 6.5, 'gunning_fog': 8.28, 'text_standard': '6th and 7th


8.28, 'text_standard': '6th and 7th grade', 'fernandez_huerta': 115.58, 'szigriszt_pazos': 112.37, 'gutierrez_polini': 54.83, 'crawford': 1.4, 'gulpease_index': 72.1, 'osman': 100.17}    {'action': 'on_llm_end', 'token_usage_prompt_tokens': 24, 'token_usage_completion_tokens': 138, 'token_usage_total_tokens': 162, 'model_name': 'text-davinci-003', 'step': 4, 'starts': 2, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'text': '\n\nQ: What did the fish say when it hit the wall?\nA: Dam!', 'generation_info_finish_reason': 'stop', 'generation_info_logprobs': None, 'flesch_reading_ease': 109.04, 'flesch_kincaid_grade': 1.3, 'smog_index': 0.0, 'coleman_liau_index': -1.24, 'automated_readability_index': 0.3, 'dale_chall_readability_score': 5.5, 'difficult_words': 0, 'linsear_write_formula': 5.5, 'gunning_fog': 5.2, 'text_standard': '5th and 6th grade', 'fernandez_huerta':


'text_standard': '5th and 6th grade', 'fernandez_huerta': 133.58, 'szigriszt_pazos': 131.54, 'gutierrez_polini': 62.3, 'crawford': -0.2, 'gulpease_index': 79.8, 'osman': 116.91}    {'action': 'on_llm_end', 'token_usage_prompt_tokens': 24, 'token_usage_completion_tokens': 138, 'token_usage_total_tokens': 162, 'model_name': 'text-davinci-003', 'step': 4, 'starts': 2, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'text': '\n\nRoses are red,\nViolets are blue,\nSugar is sweet,\nAnd so are you.', 'generation_info_finish_reason': 'stop', 'generation_info_logprobs': None, 'flesch_reading_ease': 83.66, 'flesch_kincaid_grade': 4.8, 'smog_index': 0.0, 'coleman_liau_index': 3.23, 'automated_readability_index': 3.9, 'dale_chall_readability_score': 6.71, 'difficult_words': 2, 'linsear_write_formula': 6.5, 'gunning_fog': 8.28, 'text_standard': '6th and 7th grade', 'fernandez_huerta':


'text_standard': '6th and 7th grade', 'fernandez_huerta': 115.58, 'szigriszt_pazos': 112.37, 'gutierrez_polini': 54.83, 'crawford': 1.4, 'gulpease_index': 72.1, 'osman': 100.17}    {'action': 'on_llm_end', 'token_usage_prompt_tokens': 24, 'token_usage_completion_tokens': 138, 'token_usage_total_tokens': 162, 'model_name': 'text-davinci-003', 'step': 4, 'starts': 2, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'text': '\n\nQ: What did the fish say when it hit the wall?\nA: Dam!', 'generation_info_finish_reason': 'stop', 'generation_info_logprobs': None, 'flesch_reading_ease': 109.04, 'flesch_kincaid_grade': 1.3, 'smog_index': 0.0, 'coleman_liau_index': -1.24, 'automated_readability_index': 0.3, 'dale_chall_readability_score': 5.5, 'difficult_words': 0, 'linsear_write_formula': 5.5, 'gunning_fog': 5.2, 'text_standard': '5th and 6th grade', 'fernandez_huerta': 133.58,


and 6th grade', 'fernandez_huerta': 133.58, 'szigriszt_pazos': 131.54, 'gutierrez_polini': 62.3, 'crawford': -0.2, 'gulpease_index': 79.8, 'osman': 116.91}    {'action': 'on_llm_end', 'token_usage_prompt_tokens': 24, 'token_usage_completion_tokens': 138, 'token_usage_total_tokens': 162, 'model_name': 'text-davinci-003', 'step': 4, 'starts': 2, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'text': '\n\nRoses are red,\nViolets are blue,\nSugar is sweet,\nAnd so are you.', 'generation_info_finish_reason': 'stop', 'generation_info_logprobs': None, 'flesch_reading_ease': 83.66, 'flesch_kincaid_grade': 4.8, 'smog_index': 0.0, 'coleman_liau_index': 3.23, 'automated_readability_index': 3.9, 'dale_chall_readability_score': 6.71, 'difficult_words': 2, 'linsear_write_formula': 6.5, 'gunning_fog': 8.28, 'text_standard': '6th and 7th grade', 'fernandez_huerta': 115.58,


and 7th grade', 'fernandez_huerta': 115.58, 'szigriszt_pazos': 112.37, 'gutierrez_polini': 54.83, 'crawford': 1.4, 'gulpease_index': 72.1, 'osman': 100.17}    {'action_records':           action    name  step  starts  ends  errors  text_ctr  chain_starts  \    0   on_llm_start  OpenAI     1       1     0       0         0             0       1   on_llm_start  OpenAI     1       1     0       0         0             0       2   on_llm_start  OpenAI     1       1     0       0         0             0       3   on_llm_start  OpenAI     1       1     0       0         0             0       4   on_llm_start


0       4   on_llm_start  OpenAI     1       1     0       0         0             0       5   on_llm_start  OpenAI     1       1     0       0         0             0       6     on_llm_end     NaN     2       1     1       0         0             0       7     on_llm_end     NaN     2       1     1       0         0             0       8     on_llm_end     NaN     2       1     1       0         0             0       9     on_llm_end     NaN     2       1


NaN     2       1     1       0         0             0       10    on_llm_end     NaN     2       1     1       0         0             0       11    on_llm_end     NaN     2       1     1       0         0             0       12  on_llm_start  OpenAI     3       2     1       0         0             0       13  on_llm_start  OpenAI     3       2     1       0         0             0       14  on_llm_start  OpenAI     3       2     1       0         0


0             0       15  on_llm_start  OpenAI     3       2     1       0         0             0       16  on_llm_start  OpenAI     3       2     1       0         0             0       17  on_llm_start  OpenAI     3       2     1       0         0             0       18    on_llm_end     NaN     4       2     2       0         0             0       19    on_llm_end     NaN     4       2     2       0         0             0       20    on_llm_end     NaN     4


on_llm_end     NaN     4       2     2       0         0             0       21    on_llm_end     NaN     4       2     2       0         0             0       22    on_llm_end     NaN     4       2     2       0         0             0       23    on_llm_end     NaN     4       2     2       0         0             0               chain_ends  llm_starts  ...  difficult_words  linsear_write_formula  \    0            0           1  ...              NaN                    NaN       1            0


1            0           1  ...              NaN                    NaN       2            0           1  ...              NaN                    NaN       3            0           1  ...              NaN                    NaN       4            0           1  ...              NaN                    NaN       5            0           1  ...              NaN                    NaN       6            0           1  ...              0.0


0.0                    5.5       7            0           1  ...              2.0                    6.5       8            0           1  ...              0.0                    5.5       9            0           1  ...              2.0                    6.5       10           0           1  ...              0.0                    5.5       11           0           1  ...              2.0


2.0                    6.5       12           0           2  ...              NaN                    NaN       13           0           2  ...              NaN                    NaN       14           0           2  ...              NaN                    NaN       15           0           2  ...              NaN                    NaN       16           0           2  ...              NaN                    NaN       17           0


0           2  ...              NaN                    NaN       18           0           2  ...              0.0                    5.5       19           0           2  ...              2.0                    6.5       20           0           2  ...              0.0                    5.5       21           0           2  ...              2.0                    6.5       22           0           2  ...


2  ...              0.0                    5.5       23           0           2  ...              2.0                    6.5               gunning_fog      text_standard  fernandez_huerta szigriszt_pazos  \    0           NaN                NaN               NaN             NaN       1           NaN                NaN               NaN             NaN       2           NaN                NaN               NaN             NaN       3           NaN                NaN               NaN


NaN               NaN             NaN       4           NaN                NaN               NaN             NaN       5           NaN                NaN               NaN             NaN       6          5.20  5th and 6th grade            133.58          131.54       7          8.28  6th and 7th grade            115.58          112.37       8          5.20  5th and 6th grade            133.58          131.54       9          8.28  6th and 7th grade            115.58          112.37       10


112.37       10         5.20  5th and 6th grade            133.58          131.54       11         8.28  6th and 7th grade            115.58          112.37       12          NaN                NaN               NaN             NaN       13          NaN                NaN               NaN             NaN       14          NaN                NaN               NaN             NaN       15          NaN                NaN               NaN             NaN       16          NaN


NaN                NaN               NaN             NaN       17          NaN                NaN               NaN             NaN       18         5.20  5th and 6th grade            133.58          131.54       19         8.28  6th and 7th grade            115.58          112.37       20         5.20  5th and 6th grade            133.58          131.54       21         8.28  6th and 7th grade            115.58          112.37       22         5.20  5th and 6th grade            133.58


133.58          131.54       23         8.28  6th and 7th grade            115.58          112.37               gutierrez_polini  crawford  gulpease_index   osman      0                NaN       NaN             NaN     NaN      1                NaN       NaN             NaN     NaN      2                NaN       NaN             NaN     NaN      3                NaN       NaN             NaN     NaN      4                NaN       NaN             NaN     NaN      5                NaN       NaN             NaN     NaN


NaN             NaN     NaN      6              62.30      -0.2            79.8  116.91      7              54.83       1.4            72.1  100.17      8              62.30      -0.2            79.8  116.91      9              54.83       1.4            72.1  100.17      10             62.30      -0.2            79.8  116.91      11             54.83       1.4            72.1  100.17      12               NaN       NaN             NaN     NaN      13


NaN      13               NaN       NaN             NaN     NaN      14               NaN       NaN             NaN     NaN      15               NaN       NaN             NaN     NaN      16               NaN       NaN             NaN     NaN      17               NaN       NaN             NaN     NaN      18             62.30      -0.2            79.8  116.91      19             54.83       1.4            72.1  100.17      20             62.30      -0.2            79.8  116.91


79.8  116.91      21             54.83       1.4            72.1  100.17      22             62.30      -0.2            79.8  116.91      23             54.83       1.4            72.1  100.17          [24 rows x 39 columns], 'session_analysis':     prompt_step         prompts    name  output_step  \    0             1  Tell me a joke  OpenAI            2       1             1  Tell me a poem  OpenAI            2       2             1  Tell me a joke  OpenAI            2       3             1  Tell me a poem  OpenAI            2       4


2       4             1  Tell me a joke  OpenAI            2       5             1  Tell me a poem  OpenAI            2       6             3  Tell me a joke  OpenAI            4       7             3  Tell me a poem  OpenAI            4       8             3  Tell me a joke  OpenAI            4       9             3  Tell me a poem  OpenAI            4       10            3  Tell me a joke  OpenAI            4       11            3  Tell me a poem  OpenAI            4


output  \    0   \n\nQ: What did the fish say when it hit the w...       1   \n\nRoses are red,\nViolets are blue,\nSugar i...       2   \n\nQ: What did the fish say when it hit the w...       3   \n\nRoses are red,\nViolets are blue,\nSugar i...       4   \n\nQ: What did the fish say when it hit the w...       5   \n\nRoses are red,\nViolets are blue,\nSugar i...       6   \n\nQ: What did the fish say when it hit the w...       7   \n\nRoses are red,\nViolets are blue,\nSugar i...       8   \n\nQ: What did the fish say when it hit the w...       9   \n\nRoses are red,\nViolets are blue,\nSugar i...       10  \n\nQ: What did the fish say when it hit the w...       11  \n\nRoses are red,\nViolets are blue,\nSugar i...               token_usage_total_tokens  token_usage_prompt_tokens  \    0


\    0                        162                         24       1                        162                         24       2                        162                         24       3                        162                         24       4                        162                         24       5                        162                         24       6                        162


162                         24       7                        162                         24       8                        162                         24       9                        162                         24       10                       162                         24       11                       162                         24               token_usage_completion_tokens  flesch_reading_ease  flesch_kincaid_grade  \    0                             138


138               109.04                   1.3       1                             138                83.66                   4.8       2                             138               109.04                   1.3       3                             138                83.66                   4.8       4                             138               109.04                   1.3       5


138                83.66                   4.8       6                             138               109.04                   1.3       7                             138                83.66                   4.8       8                             138               109.04                   1.3       9                             138                83.66                   4.8       10


10                            138               109.04                   1.3       11                            138                83.66                   4.8               ...  difficult_words  linsear_write_formula  gunning_fog  \    0   ...                0                    5.5         5.20       1   ...                2                    6.5         8.28       2   ...                0                    5.5         5.20       3   ...                2


...                2                    6.5         8.28       4   ...                0                    5.5         5.20       5   ...                2                    6.5         8.28       6   ...                0                    5.5         5.20       7   ...                2                    6.5         8.28       8   ...                0                    5.5         5.20       9   ...                2


...                2                    6.5         8.28       10  ...                0                    5.5         5.20       11  ...                2                    6.5         8.28                   text_standard  fernandez_huerta  szigriszt_pazos  gutierrez_polini  \    0   5th and 6th grade            133.58           131.54             62.30       1   6th and 7th grade            115.58           112.37             54.83       2   5th and 6th grade            133.58           131.54


131.54             62.30       3   6th and 7th grade            115.58           112.37             54.83       4   5th and 6th grade            133.58           131.54             62.30       5   6th and 7th grade            115.58           112.37             54.83       6   5th and 6th grade            133.58           131.54             62.30       7   6th and 7th grade            115.58           112.37             54.83       8   5th and 6th grade            133.58           131.54


131.54             62.30       9   6th and 7th grade            115.58           112.37             54.83       10  5th and 6th grade            133.58           131.54             62.30       11  6th and 7th grade            115.58           112.37             54.83              crawford  gulpease_index   osman      0      -0.2            79.8  116.91      1       1.4            72.1  100.17      2      -0.2            79.8  116.91      3       1.4            72.1  100.17      4      -0.2


4      -0.2            79.8  116.91      5       1.4            72.1  100.17      6      -0.2            79.8  116.91      7       1.4            72.1  100.17      8      -0.2            79.8  116.91      9       1.4            72.1  100.17      10     -0.2            79.8  116.91      11      1.4            72.1  100.17          [12 rows x 24 columns]}    2023-03-29 14:00:25,948 - clearml.Task - INFO - Completed model upload to https://files.clear.ml/langchain_callback_demo/llm.988bd727b0e94a29a3ac0ee526813545/models/simple_sequentialAt this point you can already go to https://app.clear.ml and take a look at the resulting ClearML Task that was created.Among others,


and take a look at the resulting ClearML Task that was created.Among others, you should see that this notebook is saved along with any git information. The model JSON that contains the used parameters is saved as an artifact, there are also console logs and under the plots section, you'll find tables that represent the flow of the chain.Finally, if you enabled visualizations, these are stored as HTML files under debug samples.Scenario 2: Creating an agent with toolsâ€‹To show a more advanced workflow, let's create an agent with access to tools. The way ClearML tracks the results is not different though, only the table will look slightly different as there are other types of actions taken when compared to the earlier, simpler example.You can now also see the use of the finish=True keyword, which will fully close the ClearML Task, instead of just resetting the parameters and prompts for a new conversation.from langchain.agents import initialize_agent, load_toolsfrom langchain.agents import AgentType# SCENARIO 2 - Agent with Toolstools = load_tools(["serpapi", "llm-math"], llm=llm, callbacks=callbacks)agent = initialize_agent(    tools,    llm,    agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,    callbacks=callbacks,)agent.run("Who is the wife of the person who sang summer of 69?")clearml_callback.flush_tracker(    langchain_asset=agent, name="Agent with Tools", finish=True)            > Entering new AgentExecutor chain...    {'action': 'on_chain_start', 'name': 'AgentExecutor', 'step': 1, 'starts': 1, 'ends': 0, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0,


0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 0, 'llm_ends': 0, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'input': 'Who is the wife of the person who sang summer of 69?'}    {'action': 'on_llm_start', 'name': 'OpenAI', 'step': 2, 'starts': 2, 'ends': 0, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 1, 'llm_ends': 0, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'prompts': 'Answer the following questions as best you can. You have access to the following tools:\n\nSearch: A search engine. Useful for when you need to answer questions about current events. Input should be a search query.\nCalculator: Useful for when you need to answer questions about math.\n\nUse the following format:\n\nQuestion: the input question you must answer\nThought: you should always think about what to do\nAction: the action to take, should be one of [Search, Calculator]\nAction Input: the input to the action\nObservation: the result of the action\n... (this Thought/Action/Action Input/Observation can repeat N times)\nThought: I now know the final answer\nFinal Answer: the final answer to the original input question\n\nBegin!\n\nQuestion: Who is the wife of the person who sang summer of 69?\nThought:'}    {'action': 'on_llm_end', 'token_usage_prompt_tokens':


{'action': 'on_llm_end', 'token_usage_prompt_tokens': 189, 'token_usage_completion_tokens': 34, 'token_usage_total_tokens': 223, 'model_name': 'text-davinci-003', 'step': 3, 'starts': 2, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 1, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'text': ' I need to find out who sang summer of 69 and then find out who their wife is.\nAction: Search\nAction Input: "Who sang summer of 69"', 'generation_info_finish_reason': 'stop', 'generation_info_logprobs': None, 'flesch_reading_ease': 91.61, 'flesch_kincaid_grade': 3.8, 'smog_index': 0.0, 'coleman_liau_index': 3.41, 'automated_readability_index': 3.5, 'dale_chall_readability_score': 6.06, 'difficult_words': 2, 'linsear_write_formula': 5.75, 'gunning_fog': 5.4, 'text_standard': '3rd and 4th grade', 'fernandez_huerta': 121.07, 'szigriszt_pazos': 119.5, 'gutierrez_polini': 54.91, 'crawford': 0.9, 'gulpease_index': 72.7, 'osman': 92.16}     I need to find out who sang summer


92.16}     I need to find out who sang summer of 69 and then find out who their wife is.    Action: Search    Action Input: "Who sang summer of 69"{'action': 'on_agent_action', 'tool': 'Search', 'tool_input': 'Who sang summer of 69', 'log': ' I need to find out who sang summer of 69 and then find out who their wife is.\nAction: Search\nAction Input: "Who sang summer of 69"', 'step': 4, 'starts': 3, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 1, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 1, 'tool_ends': 0, 'agent_ends': 0}    {'action': 'on_tool_start', 'input_str': 'Who sang summer of 69', 'name': 'Search', 'description': 'A search engine. Useful for when you need to answer questions about current events. Input should be a search query.', 'step': 5, 'starts': 4, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 1, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 2, 'tool_ends': 0, 'agent_ends': 0}        Observation: Bryan Adams - Summer Of 69 (Official Music Video).    Thought:{'action': 'on_tool_end', 'output': 'Bryan Adams - Summer Of 69 (Official Music


'on_tool_end', 'output': 'Bryan Adams - Summer Of 69 (Official Music Video).', 'step': 6, 'starts': 4, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 1, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 2, 'tool_ends': 1, 'agent_ends': 0}    {'action': 'on_llm_start', 'name': 'OpenAI', 'step': 7, 'starts': 5, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 2, 'tool_ends': 1, 'agent_ends': 0, 'prompts': 'Answer the following questions as best you can. You have access to the following tools:\n\nSearch: A search engine. Useful for when you need to answer questions about current events. Input should be a search query.\nCalculator: Useful for when you need to answer questions about math.\n\nUse the following format:\n\nQuestion: the input question you must answer\nThought: you should always think about what to do\nAction: the action to take, should be one of [Search, Calculator]\nAction Input: the input to the action\nObservation: the result of the action\n... (this Thought/Action/Action Input/Observation can repeat N times)\nThought: I now know the final answer\nFinal Answer: the final answer to the original input question\n\nBegin!\n\nQuestion: Who is the wife of


final answer to the original input question\n\nBegin!\n\nQuestion: Who is the wife of the person who sang summer of 69?\nThought: I need to find out who sang summer of 69 and then find out who their wife is.\nAction: Search\nAction Input: "Who sang summer of 69"\nObservation: Bryan Adams - Summer Of 69 (Official Music Video).\nThought:'}    {'action': 'on_llm_end', 'token_usage_prompt_tokens': 242, 'token_usage_completion_tokens': 28, 'token_usage_total_tokens': 270, 'model_name': 'text-davinci-003', 'step': 8, 'starts': 5, 'ends': 3, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 2, 'tool_ends': 1, 'agent_ends': 0, 'text': ' I need to find out who Bryan Adams is married to.\nAction: Search\nAction Input: "Who is Bryan Adams married to"', 'generation_info_finish_reason': 'stop', 'generation_info_logprobs': None, 'flesch_reading_ease': 94.66, 'flesch_kincaid_grade': 2.7, 'smog_index': 0.0, 'coleman_liau_index': 4.73, 'automated_readability_index': 4.0, 'dale_chall_readability_score': 7.16, 'difficult_words': 2, 'linsear_write_formula': 4.25, 'gunning_fog': 4.2, 'text_standard': '4th and 5th grade',


4.2, 'text_standard': '4th and 5th grade', 'fernandez_huerta': 124.13, 'szigriszt_pazos': 119.2, 'gutierrez_polini': 52.26, 'crawford': 0.7, 'gulpease_index': 74.7, 'osman': 84.2}     I need to find out who Bryan Adams is married to.    Action: Search    Action Input: "Who is Bryan Adams married to"{'action': 'on_agent_action', 'tool': 'Search', 'tool_input': 'Who is Bryan Adams married to', 'log': ' I need to find out who Bryan Adams is married to.\nAction: Search\nAction Input: "Who is Bryan Adams married to"', 'step': 9, 'starts': 6, 'ends': 3, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 3, 'tool_ends': 1, 'agent_ends': 0}    {'action': 'on_tool_start', 'input_str': 'Who is Bryan Adams married to', 'name': 'Search', 'description': 'A search engine. Useful for when you need to answer questions about current events. Input should be a search query.', 'step': 10, 'starts': 7, 'ends': 3, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts':


'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 4, 'tool_ends': 1, 'agent_ends': 0}        Observation: Bryan Adams has never married. In the 1990s, he was in a relationship with Danish model Cecilie Thomsen. In 2011, Bryan and Alicia Grimaldi, his ...    Thought:{'action': 'on_tool_end', 'output': 'Bryan Adams has never married. In the 1990s, he was in a relationship with Danish model Cecilie Thomsen. In 2011, Bryan and Alicia Grimaldi, his ...', 'step': 11, 'starts': 7, 'ends': 4, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 4, 'tool_ends': 2, 'agent_ends': 0}    {'action': 'on_llm_start', 'name': 'OpenAI', 'step': 12, 'starts': 8, 'ends': 4, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 3, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 4, 'tool_ends': 2, 'agent_ends': 0, 'prompts': 'Answer the following questions as best you can. You have access to the following tools:\n\nSearch: A search engine. Useful for when you need to answer questions about current events. Input should be a search query.\nCalculator: Useful for


need to answer questions about current events. Input should be a search query.\nCalculator: Useful for when you need to answer questions about math.\n\nUse the following format:\n\nQuestion: the input question you must answer\nThought: you should always think about what to do\nAction: the action to take, should be one of [Search, Calculator]\nAction Input: the input to the action\nObservation: the result of the action\n... (this Thought/Action/Action Input/Observation can repeat N times)\nThought: I now know the final answer\nFinal Answer: the final answer to the original input question\n\nBegin!\n\nQuestion: Who is the wife of the person who sang summer of 69?\nThought: I need to find out who sang summer of 69 and then find out who their wife is.\nAction: Search\nAction Input: "Who sang summer of 69"\nObservation: Bryan Adams - Summer Of 69 (Official Music Video).\nThought: I need to find out who Bryan Adams is married to.\nAction: Search\nAction Input: "Who is Bryan Adams married to"\nObservation: Bryan Adams has never married. In the 1990s, he was in a relationship with Danish model Cecilie Thomsen. In 2011, Bryan and Alicia Grimaldi, his ...\nThought:'}    {'action': 'on_llm_end', 'token_usage_prompt_tokens': 314, 'token_usage_completion_tokens': 18, 'token_usage_total_tokens': 332, 'model_name': 'text-davinci-003', 'step': 13, 'starts': 8, 'ends': 5, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 3, 'llm_ends': 3,


0, 'llm_starts': 3, 'llm_ends': 3, 'llm_streams': 0, 'tool_starts': 4, 'tool_ends': 2, 'agent_ends': 0, 'text': ' I now know the final answer.\nFinal Answer: Bryan Adams has never been married.', 'generation_info_finish_reason': 'stop', 'generation_info_logprobs': None, 'flesch_reading_ease': 81.29, 'flesch_kincaid_grade': 3.7, 'smog_index': 0.0, 'coleman_liau_index': 5.75, 'automated_readability_index': 3.9, 'dale_chall_readability_score': 7.37, 'difficult_words': 1, 'linsear_write_formula': 2.5, 'gunning_fog': 2.8, 'text_standard': '3rd and 4th grade', 'fernandez_huerta': 115.7, 'szigriszt_pazos': 110.84, 'gutierrez_polini': 49.79, 'crawford': 0.7, 'gulpease_index': 85.4, 'osman': 83.14}     I now know the final answer.    Final Answer: Bryan Adams has never been married.    {'action': 'on_agent_finish', 'output': 'Bryan Adams has never been married.', 'log': ' I now know the final answer.\nFinal Answer: Bryan Adams has never been married.', 'step': 14, 'starts': 8, 'ends': 6, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 3,


1, 'chain_ends': 0, 'llm_starts': 3, 'llm_ends': 3, 'llm_streams': 0, 'tool_starts': 4, 'tool_ends': 2, 'agent_ends': 1}        > Finished chain.    {'action': 'on_chain_end', 'outputs': 'Bryan Adams has never been married.', 'step': 15, 'starts': 8, 'ends': 7, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 1, 'llm_starts': 3, 'llm_ends': 3, 'llm_streams': 0, 'tool_starts': 4, 'tool_ends': 2, 'agent_ends': 1}    {'action_records':              action    name  step  starts  ends  errors  text_ctr  \    0      on_llm_start  OpenAI     1       1     0       0         0       1      on_llm_start  OpenAI     1       1     0       0         0       2      on_llm_start  OpenAI     1       1     0       0         0       3


0       3      on_llm_start  OpenAI     1       1     0       0         0       4      on_llm_start  OpenAI     1       1     0       0         0       ..              ...     ...   ...     ...   ...     ...       ...       66      on_tool_end     NaN    11       7     4       0         0       67     on_llm_start  OpenAI    12       8     4       0         0       68       on_llm_end     NaN    13       8     5       0         0       69  on_agent_finish     NaN    14       8     6       0


6       0         0       70     on_chain_end     NaN    15       8     7       0         0               chain_starts  chain_ends  llm_starts  ...  gulpease_index  osman  input  \    0              0           0           1  ...             NaN    NaN    NaN       1              0           0           1  ...             NaN    NaN    NaN       2              0           0           1  ...             NaN    NaN    NaN       3              0           0           1  ...             NaN    NaN    NaN


NaN    NaN    NaN       4              0           0           1  ...             NaN    NaN    NaN       ..           ...         ...         ...  ...             ...    ...    ...       66             1           0           2  ...             NaN    NaN    NaN       67             1           0           3  ...             NaN    NaN    NaN       68             1           0           3  ...            85.4  83.14    NaN       69             1           0           3


0           3  ...             NaN    NaN    NaN       70             1           1           3  ...             NaN    NaN    NaN               tool  tool_input                                                log  \    0    NaN         NaN                                                NaN       1    NaN         NaN                                                NaN       2    NaN         NaN                                                NaN       3    NaN


NaN       3    NaN         NaN                                                NaN       4    NaN         NaN                                                NaN       ..   ...         ...                                                ...       66   NaN         NaN                                                NaN       67   NaN         NaN                                                NaN       68   NaN         NaN


NaN       69   NaN         NaN   I now know the final answer.\nFinal Answer: B...       70   NaN         NaN                                                NaN               input_str  description                                             output  \    0         NaN          NaN                                                NaN       1         NaN          NaN                                                NaN       2         NaN          NaN


NaN       3         NaN          NaN                                                NaN       4         NaN          NaN                                                NaN       ..        ...          ...                                                ...       66        NaN          NaN  Bryan Adams has never married. In the 1990s, h...       67        NaN          NaN                                                NaN       68        NaN


NaN       68        NaN          NaN                                                NaN       69        NaN          NaN                Bryan Adams has never been married.       70        NaN          NaN                                                NaN                                           outputs      0                                   NaN      1                                   NaN      2                                   NaN      3


NaN      4                                   NaN      ..                                  ...      66                                  NaN      67                                  NaN      68                                  NaN      69                                  NaN      70  Bryan Adams has never been married.          [71 rows x 47 columns], 'session_analysis':    prompt_step                                            prompts    name  \    0            2  Answer the following questions as best you can...  OpenAI


2  Answer the following questions as best you can...  OpenAI       1            7  Answer the following questions as best you can...  OpenAI       2           12  Answer the following questions as best you can...  OpenAI              output_step                                             output  \    0            3   I need to find out who sang summer of 69 and ...       1            8   I need to find out who Bryan Adams is married...       2           13   I now know the final answer.\nFinal Answer: B...              token_usage_total_tokens  token_usage_prompt_tokens  \    0                       223                        189       1                       270                        242       2


242       2                       332                        314              token_usage_completion_tokens  flesch_reading_ease  flesch_kincaid_grade  \    0                             34                91.61                   3.8       1                             28                94.66                   2.7       2                             18                81.29                   3.7              ...  difficult_words  linsear_write_formula  gunning_fog  \    0  ...                2


2                   5.75          5.4       1  ...                2                   4.25          4.2       2  ...                1                   2.50          2.8                  text_standard  fernandez_huerta  szigriszt_pazos  gutierrez_polini  \    0  3rd and 4th grade            121.07           119.50             54.91       1  4th and 5th grade            124.13           119.20             52.26       2  3rd and 4th grade            115.70           110.84             49.79             crawford


49.79             crawford  gulpease_index  osman      0      0.9            72.7  92.16      1      0.7            74.7  84.20      2      0.7            85.4  83.14          [3 rows x 24 columns]}    Could not update last created model in Task 988bd727b0e94a29a3ac0ee526813545, Task status 'completed' cannot be updatedTips and Next Stepsâ€‹Make sure you always use a unique name argument for the clearml_callback.flush_tracker function. If not, the model parameters used for a run will override the previous run!If you close the ClearML Callback using clearml_callback.flush_tracker(..., finish=True) the Callback cannot be used anymore. Make a new one if you want to keep logging.Check out the rest of the open source ClearML ecosystem, there is a data version manager, a remote execution agent, automated pipelines and much more!PreviousClarifaiNextCnosDBInstallation and SetupGetting API CredentialsCallbacksScenario 1: Just an LLMScenario 2: Creating an agent with toolsTips and Next StepsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


YouTube | ğŸ¦œï¸�ğŸ”— Langchain


Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsVector storesGrouped by providerWandB TracingAI21 LabsAimAirbyteAirtableAleph AlphaAlibaba Cloud OpensearchAmazon API GatewayAnalyticDBAnnoyAnyscaleApifyArangoDBArgillaArthurArxivAtlasDBAwaDBAWS S3 DirectoryAZLyricsAzure Blob StorageAzure Cognitive SearchAzure OpenAIBananaBasetenBeamBedrockBiliBiliBlackboardBrave SearchCassandraCerebriumAIChaindeskChromaClarifaiClearMLCnosDBCohereCollege ConfidentialCometConfluenceC TransformersDatabricksDatadog TracingDatadog LogsDataForSEODeepInfraDeep LakeDiffbotDiscordDocugamiDuckDBElasticsearchEverNoteFacebook ChatFigmaFlyteForefrontAIGitGitBookGoldenGoogle BigQueryGoogle Cloud StorageGoogle DriveGoogle SearchGoogle SerperGooseAIGPT4AllGraphsignalGrobidGutenbergHacker NewsHazy ResearchHeliconeHologresHugging FaceiFixitIMSDbInfinoJinaLanceDBLangChain Decorators âœ¨Llama.cppMarqoMediaWikiDumpMetalMicrosoft OneDriveMicrosoft PowerPointMicrosoft WordMilvusMLflow AI GatewayMLflowModalModelScopeModern TreasuryMomentoMotherduckMyScaleNLPCloudNotion DBObsidianOpenAIOpenLLMOpenSearchOpenWeatherMapPetalsPGVectorPineconePipelineAIPortkeyPredibasePrediction GuardPromptLayerPsychicQdrantRay ServeRebuffRedditRedisReplicateRoamRocksetRunhouseRWKV-4SageMaker EndpointSearxNG Search APISerpAPIShale


EndpointSearxNG Search APISerpAPIShale ProtocolSingleStoreDBscikit-learnSlackspaCySpreedlyStarRocksStochasticAIStripeTairTelegramTigris2MarkdownTrelloTruLensTwitterTypesenseUnstructuredVectaraVespaWeights & BiasesWeatherWeaviateWhatsAppWhyLabsWikipediaWolfram AlphaWriterYeager.aiYouTubeZepZillizIntegrationsGrouped by providerYouTubeOn this pageYouTubeYouTube is an online video sharing and social media platform by Google.


We download the YouTube transcripts and video information.Installation and Setupâ€‹pip install youtube-transcript-apipip install pytubeSee a usage example.Document Loaderâ€‹See a usage example.from langchain.document_loaders import YoutubeLoaderfrom langchain.document_loaders import GoogleApiYoutubeLoaderPreviousYeager.aiNextZepInstallation and SetupDocument LoaderCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


LanceDB | ğŸ¦œï¸�ğŸ”— Langchain


EndpointSearxNG Search APISerpAPIShale ProtocolSingleStoreDBscikit-learnSlackspaCySpreedlyStarRocksStochasticAIStripeTairTelegramTigris2MarkdownTrelloTruLensTwitterTypesenseUnstructuredVectaraVespaWeights & BiasesWeatherWeaviateWhatsAppWhyLabsWikipediaWolfram AlphaWriterYeager.aiYouTubeZepZillizIntegrationsGrouped by providerLanceDBOn this pageLanceDBThis page covers how to use LanceDB within LangChain.


It is broken into two parts: installation and setup, and then references to specific LanceDB wrappers.Installation and Setupâ€‹Install the Python SDK with pip install lancedbWrappersâ€‹VectorStoreâ€‹There exists a wrapper around LanceDB databases, allowing you to use it as a vectorstore,
whether for semantic search or example selection.To import this vectorstore:from langchain.vectorstores import LanceDBFor a more detailed walkthrough of the LanceDB wrapper, see this notebookPreviousJinaNextLangChain Decorators âœ¨Installation and SetupWrappersVectorStoreCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Chroma | ğŸ¦œï¸�ğŸ”— Langchain


EndpointSearxNG Search APISerpAPIShale ProtocolSingleStoreDBscikit-learnSlackspaCySpreedlyStarRocksStochasticAIStripeTairTelegramTigris2MarkdownTrelloTruLensTwitterTypesenseUnstructuredVectaraVespaWeights & BiasesWeatherWeaviateWhatsAppWhyLabsWikipediaWolfram AlphaWriterYeager.aiYouTubeZepZillizIntegrationsGrouped by providerChromaOn this pageChromaChroma is a database for building AI applications with embeddings.Installation and Setupâ€‹pip install chromadbVectorStoreâ€‹There exists a wrapper around Chroma vector databases, allowing you to use it as a vectorstore,


whether for semantic search or example selection.from langchain.vectorstores import ChromaFor a more detailed walkthrough of the Chroma wrapper, see this notebookRetrieverâ€‹See a usage example.from langchain.retrievers import SelfQueryRetrieverPreviousChaindeskNextClarifaiInstallation and SetupVectorStoreRetrieverCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Microsoft Word | ğŸ¦œï¸�ğŸ”— Langchain


EndpointSearxNG Search APISerpAPIShale ProtocolSingleStoreDBscikit-learnSlackspaCySpreedlyStarRocksStochasticAIStripeTairTelegramTigris2MarkdownTrelloTruLensTwitterTypesenseUnstructuredVectaraVespaWeights & BiasesWeatherWeaviateWhatsAppWhyLabsWikipediaWolfram AlphaWriterYeager.aiYouTubeZepZillizIntegrationsGrouped by providerMicrosoft WordOn this pageMicrosoft WordMicrosoft Word is a word processor developed by Microsoft.Installation and Setupâ€‹There isn't any special setup for it.Document Loaderâ€‹See a usage example.from langchain.document_loaders import UnstructuredWordDocumentLoaderPreviousMicrosoft PowerPointNextMilvusInstallation and SetupDocument LoaderCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Bedrock | ğŸ¦œï¸�ğŸ”— Langchain


EndpointSearxNG Search APISerpAPIShale ProtocolSingleStoreDBscikit-learnSlackspaCySpreedlyStarRocksStochasticAIStripeTairTelegramTigris2MarkdownTrelloTruLensTwitterTypesenseUnstructuredVectaraVespaWeights & BiasesWeatherWeaviateWhatsAppWhyLabsWikipediaWolfram AlphaWriterYeager.aiYouTubeZepZillizIntegrationsGrouped by providerBedrockOn this pageBedrockAmazon Bedrock is a fully managed service that makes FMs from leading AI startups and Amazon available via an API, so you can choose from a wide range of FMs to find the model that is best suited for your use case.Installation and Setupâ€‹pip install boto3LLMâ€‹See a usage example.from langchain import BedrockText Embedding Modelsâ€‹See a usage example.from langchain.embeddings import BedrockEmbeddingsPreviousBeamNextBiliBiliInstallation and SetupLLMText Embedding ModelsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


WhyLabs | ğŸ¦œï¸�ğŸ”— Langchain


EndpointSearxNG Search APISerpAPIShale ProtocolSingleStoreDBscikit-learnSlackspaCySpreedlyStarRocksStochasticAIStripeTairTelegramTigris2MarkdownTrelloTruLensTwitterTypesenseUnstructuredVectaraVespaWeights & BiasesWeatherWeaviateWhatsAppWhyLabsWikipediaWolfram AlphaWriterYeager.aiYouTubeZepZillizIntegrationsGrouped by providerWhyLabsOn this pageWhyLabsWhyLabs is an observability platform designed to monitor data pipelines and ML applications for data quality regressions, data drift, and model performance degradation. Built on top of an open-source package called whylogs, the platform enables Data Scientists and Engineers to:Set up in minutes: Begin generating statistical profiles of any dataset using whylogs, the lightweight open-source library.Upload dataset profiles to the WhyLabs platform for centralized and customizable monitoring/alerting of dataset features as well as model inputs, outputs, and performance.Integrate seamlessly: interoperable with any data pipeline, ML infrastructure, or framework. Generate real-time insights into your existing data flow. See more about our integrations here.Scale to terabytes: handle your large-scale data, keeping compute requirements low. Integrate with either batch or streaming data pipelines.Maintain data privacy: WhyLabs relies statistical profiles created via whylogs so your actual data never leaves your environment!


Enable observability to detect inputs and LLM issues faster, deliver continuous improvements, and avoid costly incidents.Installation and Setupâ€‹%pip install langkit openai langchainMake sure to set the required API keys and config required to send telemetry to WhyLabs:WhyLabs API Key: https://whylabs.ai/whylabs-free-sign-upOrg and Dataset https://docs.whylabs.ai/docs/whylabs-onboardingOpenAI: https://platform.openai.com/account/api-keysThen you can set them like this:import osos.environ["OPENAI_API_KEY"] = ""os.environ["WHYLABS_DEFAULT_ORG_ID"] = ""os.environ["WHYLABS_DEFAULT_DATASET_ID"] = ""os.environ["WHYLABS_API_KEY"] = ""Note: the callback supports directly passing in these variables to the callback, when no auth is directly passed in it will default to the environment. Passing in auth directly allows for writing profiles to multiple projects or organizations in WhyLabs.Callbacksâ€‹Here's a single LLM integration with OpenAI, which will log various out of the box metrics and send telemetry to WhyLabs for monitoring.from langchain.callbacks import WhyLabsCallbackHandlerfrom langchain.llms import OpenAIwhylabs = WhyLabsCallbackHandler.from_params()llm = OpenAI(temperature=0, callbacks=[whylabs])result = llm.generate(["Hello, World!"])print(result)    generations=[[Generation(text="\n\nMy name is John and I'm excited to learn more about programming.", generation_info={'finish_reason': 'stop', 'logprobs': None})]] llm_output={'token_usage': {'total_tokens': 20, 'prompt_tokens': 4, 'completion_tokens': 16}, 'model_name': 'text-davinci-003'}result = llm.generate(    [


= llm.generate(    [        "Can you give me 3 SSNs so I can understand the format?",        "Can you give me 3 fake email addresses?",        "Can you give me 3 fake US mailing addresses?",    ])print(result)# you don't need to call close to write profiles to WhyLabs, upload will occur periodically, but to demo let's not wait.whylabs.close()    generations=[[Generation(text='\n\n1. 123-45-6789\n2. 987-65-4321\n3. 456-78-9012', generation_info={'finish_reason': 'stop', 'logprobs': None})], [Generation(text='\n\n1. johndoe@example.com\n2. janesmith@example.com\n3. johnsmith@example.com', generation_info={'finish_reason': 'stop', 'logprobs': None})], [Generation(text='\n\n1. 123 Main Street, Anytown, USA 12345\n2. 456 Elm Street, Nowhere, USA 54321\n3. 789 Pine Avenue, Somewhere, USA 98765', generation_info={'finish_reason': 'stop', 'logprobs': None})]] llm_output={'token_usage': {'total_tokens': 137, 'prompt_tokens': 33, 'completion_tokens': 104}, 'model_name': 'text-davinci-003'}PreviousWhatsAppNextWikipediaInstallation and SetupCallbacksCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Roam | ğŸ¦œï¸�ğŸ”— Langchain


EndpointSearxNG Search APISerpAPIShale ProtocolSingleStoreDBscikit-learnSlackspaCySpreedlyStarRocksStochasticAIStripeTairTelegramTigris2MarkdownTrelloTruLensTwitterTypesenseUnstructuredVectaraVespaWeights & BiasesWeatherWeaviateWhatsAppWhyLabsWikipediaWolfram AlphaWriterYeager.aiYouTubeZepZillizIntegrationsGrouped by providerRoamOn this pageRoamROAM is a note-taking tool for networked thought, designed to create a personal knowledge base.Installation and Setupâ€‹There isn't any special setup for it.Document Loaderâ€‹See a usage example.from langchain.document_loaders import RoamLoaderPreviousReplicateNextRocksetInstallation and SetupDocument LoaderCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


AZLyrics | ğŸ¦œï¸�ğŸ”— Langchain


EndpointSearxNG Search APISerpAPIShale ProtocolSingleStoreDBscikit-learnSlackspaCySpreedlyStarRocksStochasticAIStripeTairTelegramTigris2MarkdownTrelloTruLensTwitterTypesenseUnstructuredVectaraVespaWeights & BiasesWeatherWeaviateWhatsAppWhyLabsWikipediaWolfram AlphaWriterYeager.aiYouTubeZepZillizIntegrationsGrouped by providerAZLyricsOn this pageAZLyricsAZLyrics is a large, legal, every day growing collection of lyrics.Installation and Setupâ€‹There isn't any special setup for it.Document Loaderâ€‹See a usage example.from langchain.document_loaders import AZLyricsLoaderPreviousAWS S3 DirectoryNextAzure Blob StorageInstallation and SetupDocument LoaderCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


DeepInfra | ğŸ¦œï¸�ğŸ”— Langchain


EndpointSearxNG Search APISerpAPIShale ProtocolSingleStoreDBscikit-learnSlackspaCySpreedlyStarRocksStochasticAIStripeTairTelegramTigris2MarkdownTrelloTruLensTwitterTypesenseUnstructuredVectaraVespaWeights & BiasesWeatherWeaviateWhatsAppWhyLabsWikipediaWolfram AlphaWriterYeager.aiYouTubeZepZillizIntegrationsGrouped by providerDeepInfraOn this pageDeepInfraThis page covers how to use the DeepInfra ecosystem within LangChain.


It is broken into two parts: installation and setup, and then references to specific DeepInfra wrappers.Installation and Setupâ€‹Get your DeepInfra api key from this link here.Get an DeepInfra api key and set it as an environment variable (DEEPINFRA_API_TOKEN)Available Modelsâ€‹DeepInfra provides a range of Open Source LLMs ready for deployment.
You can list supported models here.
google/flan* models can be viewed here.You can view a list of request and response parameters hereWrappersâ€‹LLMâ€‹There exists an DeepInfra LLM wrapper, which you can access withfrom langchain.llms import DeepInfraPreviousDataForSEONextDeep LakeInstallation and SetupAvailable ModelsWrappersLLMCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Obsidian | ğŸ¦œï¸�ğŸ”— Langchain


EndpointSearxNG Search APISerpAPIShale ProtocolSingleStoreDBscikit-learnSlackspaCySpreedlyStarRocksStochasticAIStripeTairTelegramTigris2MarkdownTrelloTruLensTwitterTypesenseUnstructuredVectaraVespaWeights & BiasesWeatherWeaviateWhatsAppWhyLabsWikipediaWolfram AlphaWriterYeager.aiYouTubeZepZillizIntegrationsGrouped by providerObsidianOn this pageObsidianObsidian is a powerful and extensible knowledge base


that works on top of your local folder of plain text files.Installation and Setupâ€‹All instructions are in examples below.Document Loaderâ€‹See a usage example.from langchain.document_loaders import ObsidianLoaderPreviousNotion DBNextOpenAIInstallation and SetupDocument LoaderCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Cassandra | ğŸ¦œï¸�ğŸ”— Langchain


Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsVector storesGrouped by providerWandB TracingAI21 LabsAimAirbyteAirtableAleph AlphaAlibaba Cloud OpensearchAmazon API GatewayAnalyticDBAnnoyAnyscaleApifyArangoDBArgillaArthurArxivAtlasDBAwaDBAWS S3 DirectoryAZLyricsAzure Blob StorageAzure Cognitive SearchAzure OpenAIBananaBasetenBeamBedrockBiliBiliBlackboardBrave SearchCassandraCerebriumAIChaindeskChromaClarifaiClearMLCnosDBCohereCollege ConfidentialCometConfluenceC TransformersDatabricksDatadog TracingDatadog LogsDataForSEODeepInfraDeep LakeDiffbotDiscordDocugamiDuckDBElasticsearchEverNoteFacebook ChatFigmaFlyteForefrontAIGitGitBookGoldenGoogle BigQueryGoogle Cloud StorageGoogle DriveGoogle SearchGoogle SerperGooseAIGPT4AllGraphsignalGrobidGutenbergHacker NewsHazy ResearchHeliconeHologresHugging FaceiFixitIMSDbInfinoJinaLanceDBLangChain Decorators âœ¨Llama.cppMarqoMediaWikiDumpMetalMicrosoft OneDriveMicrosoft PowerPointMicrosoft WordMilvusMLflow AI GatewayMLflowModalModelScopeModern TreasuryMomentoMotherduckMyScaleNLPCloudNotion DBObsidianOpenAIOpenLLMOpenSearchOpenWeatherMapPetalsPGVectorPineconePipelineAIPortkeyPredibasePrediction GuardPromptLayerPsychicQdrantRay ServeRebuffRedditRedisReplicateRoamRocksetRunhouseRWKV-4SageMaker EndpointSearxNG Search APISerpAPIShale


EndpointSearxNG Search APISerpAPIShale ProtocolSingleStoreDBscikit-learnSlackspaCySpreedlyStarRocksStochasticAIStripeTairTelegramTigris2MarkdownTrelloTruLensTwitterTypesenseUnstructuredVectaraVespaWeights & BiasesWeatherWeaviateWhatsAppWhyLabsWikipediaWolfram AlphaWriterYeager.aiYouTubeZepZillizIntegrationsGrouped by providerCassandraOn this pageCassandraApache CassandraÂ® is a free and open-source, distributed, wide-column


store, NoSQL database management system designed to handle large amounts of data across many commodity servers,
providing high availability with no single point of failure. Cassandra offers support for clusters spanning
multiple datacenters, with asynchronous masterless replication allowing low latency operations for all clients.
Cassandra was designed to implement a combination of Amazon's Dynamo distributed storage and replication
techniques combined with Google's Bigtable data and storage engine model.Installation and Setupâ€‹pip install cassandra-driverpip install cassioVector Storeâ€‹See a usage example.from langchain.memory import CassandraChatMessageHistoryMemoryâ€‹See a usage example.from langchain.memory import CassandraChatMessageHistoryPreviousBrave SearchNextCerebriumAIInstallation and SetupVector StoreMemoryCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


AtlasDB | ğŸ¦œï¸�ğŸ”— Langchain


EndpointSearxNG Search APISerpAPIShale ProtocolSingleStoreDBscikit-learnSlackspaCySpreedlyStarRocksStochasticAIStripeTairTelegramTigris2MarkdownTrelloTruLensTwitterTypesenseUnstructuredVectaraVespaWeights & BiasesWeatherWeaviateWhatsAppWhyLabsWikipediaWolfram AlphaWriterYeager.aiYouTubeZepZillizIntegrationsGrouped by providerAtlasDBOn this pageAtlasDBThis page covers how to use Nomic's Atlas ecosystem within LangChain.


It is broken into two parts: installation and setup, and then references to specific Atlas wrappers.Installation and Setupâ€‹Install the Python package with pip install nomicNomic is also included in langchains poetry extras poetry install -E allWrappersâ€‹VectorStoreâ€‹There exists a wrapper around the Atlas neural database, allowing you to use it as a vectorstore.
This vectorstore also gives you full access to the underlying AtlasProject object, which will allow you to use the full range of Atlas map interactions, such as bulk tagging and automatic topic modeling.
Please see the Atlas docs for more detailed information.To import this vectorstore:from langchain.vectorstores import AtlasDBFor a more detailed walkthrough of the AtlasDB wrapper, see this notebookPreviousArxivNextAwaDBInstallation and SetupWrappersVectorStoreCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Diffbot | ğŸ¦œï¸�ğŸ”— Langchain


EndpointSearxNG Search APISerpAPIShale ProtocolSingleStoreDBscikit-learnSlackspaCySpreedlyStarRocksStochasticAIStripeTairTelegramTigris2MarkdownTrelloTruLensTwitterTypesenseUnstructuredVectaraVespaWeights & BiasesWeatherWeaviateWhatsAppWhyLabsWikipediaWolfram AlphaWriterYeager.aiYouTubeZepZillizIntegrationsGrouped by providerDiffbotOn this pageDiffbotDiffbot is a service to read web pages. Unlike traditional web scraping tools,


Diffbot doesn't require any rules to read the content on a page.
It starts with computer vision, which classifies a page into one of 20 possible types. Content is then interpreted by a machine learning model trained to identify the key attributes on a page based on its type.
The result is a website transformed into clean-structured data (like JSON or CSV), ready for your application.Installation and Setupâ€‹Read instructions how to get the Diffbot API Token.Document Loaderâ€‹See a usage example.from langchain.document_loaders import DiffbotLoaderPreviousDeep LakeNextDiscordInstallation and SetupDocument LoaderCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Aleph Alpha | ğŸ¦œï¸�ğŸ”— Langchain


EndpointSearxNG Search APISerpAPIShale ProtocolSingleStoreDBscikit-learnSlackspaCySpreedlyStarRocksStochasticAIStripeTairTelegramTigris2MarkdownTrelloTruLensTwitterTypesenseUnstructuredVectaraVespaWeights & BiasesWeatherWeaviateWhatsAppWhyLabsWikipediaWolfram AlphaWriterYeager.aiYouTubeZepZillizIntegrationsGrouped by providerAleph AlphaOn this pageAleph AlphaAleph Alpha was founded in 2019 with the mission to research and build the foundational technology for an era of strong AI. The team of international scientists, engineers, and innovators researches, develops, and deploys transformative AI like large language and multimodal models and runs the fastest European commercial AI cluster.The Luminous series is a family of large language models.Installation and Setupâ€‹pip install aleph-alpha-clientYou have to create a new token. Please, see instructions.from getpass import getpassALEPH_ALPHA_API_KEY = getpass()LLMâ€‹See a usage example.from langchain.llms import AlephAlphaText Embedding Modelsâ€‹See a usage example.from langchain.embeddings import AlephAlphaSymmetricSemanticEmbedding, AlephAlphaAsymmetricSemanticEmbeddingPreviousAirtableNextAlibaba Cloud OpensearchInstallation and SetupLLMText Embedding ModelsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


LangChain Decorators âœ¨ | ğŸ¦œï¸�ğŸ”— Langchain


EndpointSearxNG Search APISerpAPIShale ProtocolSingleStoreDBscikit-learnSlackspaCySpreedlyStarRocksStochasticAIStripeTairTelegramTigris2MarkdownTrelloTruLensTwitterTypesenseUnstructuredVectaraVespaWeights & BiasesWeatherWeaviateWhatsAppWhyLabsWikipediaWolfram AlphaWriterYeager.aiYouTubeZepZillizIntegrationsGrouped by providerLangChain Decorators âœ¨On this pageLangChain Decorators âœ¨lanchchain decorators is a layer on the top of LangChain that provides syntactic sugar ğŸ� for writing custom langchain prompts and chainsFor Feedback, Issues, Contributions - please raise an issue here:


ju-bezdek/langchain-decoratorsMain principles and benefits:more pythonic way of writing codewrite multiline prompts that won't break your code flow with indentationmaking use of IDE in-built support for hinting, type checking and popup with docs to quickly peek in the function to see the prompt, parameters it consumes etc.leverage all the power of ğŸ¦œğŸ”— LangChain ecosystemadding support for optional parameterseasily share parameters between the prompts by binding them to one classHere is a simple example of a code written with LangChain Decorators âœ¨@llm_promptdef write_me_short_post(topic:str, platform:str="twitter", audience:str = "developers")->str:    """    Write me a short header for my post about {topic} for {platform} platform.     It should be for {audience} audience.    (Max 15 words)    """    return# run it naturallywrite_me_short_post(topic="starwars")# orwrite_me_short_post(topic="starwars", platform="redit")Quick startInstallationâ€‹pip install langchain_decoratorsExamplesâ€‹Good idea on how to start is to review the examples here:jupyter notebookcolab notebookDefining other parametersHere we are just marking a function as a prompt with llm_prompt decorator, turning it effectively into a LLMChain. Instead of running it Standard LLMchain takes much more init parameter than just inputs_variables and prompt... here is this implementation detail hidden in the decorator.


Here is how it works:Using Global settings:# define global settings for all prompty (if not set - chatGPT is the current default)from langchain_decorators import GlobalSettingsGlobalSettings.define_settings(    default_llm=ChatOpenAI(temperature=0.0), this is default... can change it here globally    default_streaming_llm=ChatOpenAI(temperature=0.0,streaming=True), this is default... can change it here for all ... will be used for streaming)Using predefined prompt types#You can change the default prompt typesfrom langchain_decorators import PromptTypes, PromptTypeSettingsPromptTypes.AGENT_REASONING.llm = ChatOpenAI()# Or you can just define your own ones:class MyCustomPromptTypes(PromptTypes):    GPT4=PromptTypeSettings(llm=ChatOpenAI(model="gpt-4"))@llm_prompt(prompt_type=MyCustomPromptTypes.GPT4) def write_a_complicated_code(app_idea:str)->str:    ...Define the settings directly in the decoratorfrom langchain.llms import OpenAI@llm_prompt(    llm=OpenAI(temperature=0.7),    stop_tokens=["\nObservation"],    ...    )def creative_writer(book_title:str)->str:    ...Passing a memory and/or callbacks:â€‹To pass any of these, just declare them in the function (or use kwargs to pass anything)@llm_prompt()async def write_me_short_post(topic:str, platform:str="twitter", memory:SimpleMemory = None):    """    {history_key}    Write me a short header for my post about {topic} for {platform} platform.     It should be for {audience} audience.    (Max 15