Dataset Viewer
Auto-converted to Parquet Duplicate
metadata
dict
id
stringlengths
14
16
text
stringlengths
31
2.73k
{ "url": "https://langchain.readthedocs.io/en/latest/index.html" }
7fb9f2a39073-0
.rst .pdf Welcome to LangChain Contents Getting Started Modules Use Cases Reference Docs LangChain Ecosystem Additional Resources Welcome to LangChain# LangChain is a framework for developing applications powered by language models. We believe that the most powerful and differentiated applications will not only call ...
{ "url": "https://langchain.readthedocs.io/en/latest/index.html" }
7fb9f2a39073-1
Agents: Agents involve an LLM making decisions about which Actions to take, taking that Action, seeing an Observation, and repeating that until done. LangChain provides a standard interface for agents, a selection of agents to choose from, and examples of end to end agents. Use Cases# The above modules can be used in a...
{ "url": "https://langchain.readthedocs.io/en/latest/index.html" }
7fb9f2a39073-2
Guides for how other companies/products can be used with LangChain LangChain Ecosystem Additional Resources# Additional collection of resources we think may be useful as you develop your application! LangChainHub: The LangChainHub is a place to share and explore other prompts, chains, and agents. Glossary: A glossary o...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-0
Index _ | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | Z _ __call__() (langchain.llms.AI21 method) (langchain.llms.AlephAlpha method) (langchain.llms.Anthropic method) (langchain.llms.AzureOpenAI method) (langchain.llms.Banana method) (langchain.llm...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-1
(langchain.llms.StochasticAI method) (langchain.llms.Writer method) A aadd_documents() (langchain.vectorstores.VectorStore method) aadd_texts() (langchain.vectorstores.VectorStore method) aapply() (langchain.chains.LLMChain method) aapply_and_parse() (langchain.chains.LLMChain method) add() (langchain.docstore.InMemory...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-2
(langchain.llms.Cohere method) (langchain.llms.DeepInfra method) (langchain.llms.ForefrontAI method) (langchain.llms.GooseAI method) (langchain.llms.GPT4All method) (langchain.llms.HuggingFaceEndpoint method) (langchain.llms.HuggingFaceHub method) (langchain.llms.HuggingFacePipeline method) (langchain.llms.LlamaCpp met...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-3
(langchain.llms.HuggingFacePipeline method) (langchain.llms.LlamaCpp method) (langchain.llms.Modal method) (langchain.llms.NLPCloud method) (langchain.llms.OpenAI method) (langchain.llms.OpenAIChat method) (langchain.llms.Petals method) (langchain.llms.PromptLayerOpenAI method) (langchain.llms.PromptLayerOpenAIChat met...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-4
api_answer_chain (langchain.chains.APIChain attribute) api_docs (langchain.chains.APIChain attribute) api_operation (langchain.chains.OpenAPIEndpointChain attribute) api_request_chain (langchain.chains.APIChain attribute) (langchain.chains.OpenAPIEndpointChain attribute) api_response_chain (langchain.chains.OpenAPIEndp...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-5
(langchain.llms.ForefrontAI attribute) (langchain.llms.Writer attribute) batch_size (langchain.llms.AzureOpenAI attribute) beam_search_diversity_rate (langchain.llms.Writer attribute) beam_width (langchain.llms.Writer attribute) best_of (langchain.llms.AlephAlpha attribute) (langchain.llms.AzureOpenAI attribute) C call...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-6
compress_to_size (langchain.embeddings.AlephAlphaAsymmetricSemanticEmbedding attribute) constitutional_principles (langchain.chains.ConstitutionalChain attribute) construct() (langchain.llms.AI21 class method) (langchain.llms.AlephAlpha class method) (langchain.llms.Anthropic class method) (langchain.llms.AzureOpenAI c...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-7
content_handler (langchain.embeddings.SagemakerEndpointEmbeddings attribute) (langchain.llms.SagemakerEndpoint attribute) CONTENT_KEY (langchain.vectorstores.Qdrant attribute) contextual_control_threshold (langchain.embeddings.AlephAlphaAsymmetricSemanticEmbedding attribute) (langchain.llms.AlephAlpha attribute) contro...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-8
(langchain.llms.SelfHostedHuggingFaceLLM method) (langchain.llms.SelfHostedPipeline method) (langchain.llms.StochasticAI method) (langchain.llms.Writer method) coroutine (langchain.agents.Tool attribute) countPenalty (langchain.llms.AI21 attribute) create_assertions_prompt (langchain.chains.LLMSummarizationCheckerChain...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-9
critique_chain (langchain.chains.ConstitutionalChain attribute) D database (langchain.chains.SQLDatabaseChain attribute) decider_chain (langchain.chains.SQLDatabaseSequentialChain attribute) DeepLake (class in langchain.vectorstores) delete() (langchain.vectorstores.DeepLake method) delete_collection() (langchain.vecto...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-10
(langchain.llms.PromptLayerOpenAI method) (langchain.llms.PromptLayerOpenAIChat method) (langchain.llms.Replicate method) (langchain.llms.RWKV method) (langchain.llms.SagemakerEndpoint method) (langchain.llms.SelfHostedHuggingFaceLLM method) (langchain.llms.SelfHostedPipeline method) (langchain.llms.StochasticAI method...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-11
(langchain.embeddings.LlamaCppEmbeddings method) (langchain.embeddings.OpenAIEmbeddings method) (langchain.embeddings.SagemakerEndpointEmbeddings method) (langchain.embeddings.SelfHostedEmbeddings method) (langchain.embeddings.SelfHostedHuggingFaceInstructEmbeddings method) (langchain.embeddings.TensorflowHubEmbeddings...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-12
(langchain.llms.ForefrontAI attribute) (langchain.llms.HuggingFaceEndpoint attribute) (langchain.llms.Modal attribute) engines (langchain.utilities.searx_search.SearxSearchWrapper attribute) entity_extraction_chain (langchain.chains.GraphQAChain attribute) error (langchain.chains.OpenAIModerationChain attribute) exampl...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-13
(langchain.prompts.PromptTemplate method) format_messages() (langchain.prompts.BaseChatPromptTemplate method) (langchain.prompts.ChatPromptTemplate method) (langchain.prompts.MessagesPlaceholder method) format_prompt() (langchain.prompts.BaseChatPromptTemplate method) (langchain.prompts.BasePromptTemplate method) (lang...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-14
(langchain.chains.ConstitutionalChain class method) (langchain.chains.ConversationalRetrievalChain class method) (langchain.chains.GraphQAChain class method) (langchain.chains.HypotheticalDocumentEmbedder class method) (langchain.chains.QAGenerationChain class method) (langchain.chains.SQLDatabaseSequentialChain class ...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-15
(langchain.vectorstores.VectorStore class method) (langchain.vectorstores.Weaviate class method) from_tiktoken_encoder() (langchain.text_splitter.TextSplitter class method) from_url_and_method() (langchain.chains.OpenAPIEndpointChain class method) func (langchain.agents.Tool attribute) G generate() (langchain.chains.LL...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-16
(langchain.llms.StochasticAI method) (langchain.llms.Writer method) generate_prompt() (langchain.llms.AI21 method) (langchain.llms.AlephAlpha method) (langchain.llms.Anthropic method) (langchain.llms.AzureOpenAI method) (langchain.llms.Banana method) (langchain.llms.CerebriumAI method) (langchain.llms.Cohere method) (l...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-17
get_answer_expr (langchain.chains.PALChain attribute) get_full_inputs() (langchain.agents.Agent method) get_num_tokens() (langchain.llms.AI21 method) (langchain.llms.AlephAlpha method) (langchain.llms.Anthropic method) (langchain.llms.AzureOpenAI method) (langchain.llms.Banana method) (langchain.llms.CerebriumAI method...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-18
(langchain.llms.AzureOpenAI method) (langchain.llms.Banana method) (langchain.llms.CerebriumAI method) (langchain.llms.Cohere method) (langchain.llms.DeepInfra method) (langchain.llms.ForefrontAI method) (langchain.llms.GooseAI method) (langchain.llms.GPT4All method) (langchain.llms.HuggingFaceEndpoint method) (langcha...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-19
graph (langchain.chains.GraphQAChain attribute) H hardware (langchain.embeddings.SelfHostedHuggingFaceEmbeddings attribute) (langchain.llms.SelfHostedHuggingFaceLLM attribute) (langchain.llms.SelfHostedPipeline attribute) headers (langchain.utilities.searx_search.SearxSearchWrapper attribute) hosting (langchain.embeddi...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-20
(langchain.llms.Anthropic method) (langchain.llms.AzureOpenAI method) (langchain.llms.Banana method) (langchain.llms.CerebriumAI method) (langchain.llms.Cohere method) (langchain.llms.DeepInfra method) (langchain.llms.ForefrontAI method) (langchain.llms.GooseAI method) (langchain.llms.GPT4All method) (langchain.llms.Hu...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-21
langchain.chains module langchain.docstore module langchain.embeddings module langchain.llms module langchain.prompts module langchain.prompts.example_selector module langchain.python module langchain.serpapi module langchain.text_s...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-22
(langchain.chains.QAGenerationChain attribute) llm_prefix (langchain.agents.Agent property) (langchain.agents.ConversationalAgent property) (langchain.agents.ConversationalChatAgent property) (langchain.agents.ZeroShotAgent property) load_agent() (in module langchain.agents) load_chain() (in module langchain.chains) lo...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-23
(langchain.agents.SelfAskWithSearchChain attribute) max_iterations (langchain.agents.AgentExecutor attribute) (langchain.agents.MRKLChain attribute) (langchain.agents.ReActChain attribute) (langchain.agents.SelfAskWithSearchChain attribute) max_length (langchain.llms.NLPCloud attribute) (langchain.llms.Petals attribute...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-24
(langchain.chains.VectorDBQAWithSourcesChain attribute) max_tokens_per_generation (langchain.llms.RWKV attribute) max_tokens_to_sample (langchain.llms.Anthropic attribute) maximum_tokens (langchain.llms.AlephAlpha attribute) maxTokens (langchain.llms.AI21 attribute) memory (langchain.agents.MRKLChain attribute) (langch...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-25
model_kwargs (langchain.embeddings.HuggingFaceHubEmbeddings attribute) (langchain.embeddings.SagemakerEndpointEmbeddings attribute) (langchain.llms.AzureOpenAI attribute) (langchain.llms.Banana attribute) (langchain.llms.CerebriumAI attribute) (langchain.llms.GooseAI attribute) (langchain.llms.HuggingFaceEndpoint attri...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-26
(langchain.embeddings.SelfHostedHuggingFaceInstructEmbeddings attribute) (langchain.llms.SelfHostedHuggingFaceLLM attribute) (langchain.llms.SelfHostedPipeline attribute) model_url (langchain.embeddings.TensorflowHubEmbeddings attribute) modelname_to_contextsize() (langchain.llms.AzureOpenAI method) (langchain.llms.Ope...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-27
normalize (langchain.embeddings.AlephAlphaAsymmetricSemanticEmbedding attribute) num_beams (langchain.llms.NLPCloud attribute) num_return_sequences (langchain.llms.NLPCloud attribute) numResults (langchain.llms.AI21 attribute) O observation_prefix (langchain.agents.Agent property) (langchain.agents.ConversationalAgent ...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-28
penalty_bias (langchain.llms.AlephAlpha attribute) penalty_exceptions (langchain.llms.AlephAlpha attribute) penalty_exceptions_include_stop_sequences (langchain.llms.AlephAlpha attribute) persist() (langchain.vectorstores.Chroma method) (langchain.vectorstores.DeepLake method) Pinecone (class in langchain.vectorstores)...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-29
(langchain.chains.PALChain attribute) (langchain.chains.SQLDatabaseChain attribute) python_globals (langchain.chains.PALChain attribute) python_locals (langchain.chains.PALChain attribute) PythonCodeTextSplitter (class in langchain.text_splitter) Q qa_chain (langchain.chains.GraphQAChain attribute) Qdrant (class in lan...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-30
(langchain.llms.NLPCloud attribute) (langchain.llms.Writer attribute) repo_id (langchain.embeddings.HuggingFaceHubEmbeddings attribute) (langchain.llms.HuggingFaceHub attribute) request_timeout (langchain.llms.AzureOpenAI attribute) requests (langchain.chains.OpenAPIEndpointChain attribute) requests_wrapper (langchain....
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-31
revised_summary_prompt (langchain.chains.LLMSummarizationCheckerChain attribute) revision_chain (langchain.chains.ConstitutionalChain attribute) run() (langchain.python.PythonREPL method) (langchain.serpapi.SerpAPIWrapper method) (langchain.utilities.searx_search.SearxSearchWrapper method) rwkv_verbose (langchain.llms....
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-32
(langchain.llms.SelfHostedHuggingFaceLLM method) (langchain.llms.SelfHostedPipeline method) (langchain.llms.StochasticAI method) (langchain.llms.Writer method) (langchain.prompts.BasePromptTemplate method) (langchain.prompts.ChatPromptTemplate method) save_agent() (langchain.agents.AgentExecutor method) save_local() (l...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-33
(langchain.vectorstores.FAISS method) (langchain.vectorstores.Milvus method) (langchain.vectorstores.OpenSearchVectorSearch method) (langchain.vectorstores.Pinecone method) (langchain.vectorstores.Qdrant method) (langchain.vectorstores.VectorStore method) (langchain.vectorstores.Weaviate method) similarity_search_by_ve...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-34
(langchain.llms.LlamaCpp attribute) (langchain.llms.Writer attribute) stop_sequences (langchain.llms.AlephAlpha attribute) strategy (langchain.llms.RWKV attribute) stream() (langchain.llms.Anthropic method) (langchain.llms.AzureOpenAI method) (langchain.llms.OpenAI method) (langchain.llms.PromptLayerOpenAI method) stre...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-35
(langchain.llms.Writer attribute) template (langchain.prompts.PromptTemplate attribute) template_format (langchain.prompts.FewShotPromptTemplate attribute) (langchain.prompts.FewShotPromptWithTemplates attribute) (langchain.prompts.PromptTemplate attribute) text_length (langchain.chains.LLMRequestsChain attribute) text...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-36
top_k_docs_for_context (langchain.chains.ChatVectorDBChain attribute) top_p (langchain.llms.AlephAlpha attribute) (langchain.llms.Anthropic attribute) (langchain.llms.AzureOpenAI attribute) (langchain.llms.ForefrontAI attribute) (langchain.llms.GooseAI attribute) (langchain.llms.GPT4All attribute) (langchain.llms.Llama...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-37
(langchain.llms.NLPCloud class method) (langchain.llms.OpenAI class method) (langchain.llms.OpenAIChat class method) (langchain.llms.Petals class method) (langchain.llms.PromptLayerOpenAI class method) (langchain.llms.PromptLayerOpenAIChat class method) (langchain.llms.Replicate class method) (langchain.llms.RWKV class...
{ "url": "https://python.langchain.com/en/latest/genindex.html" }
f445e36f9edb-38
vocab_only (langchain.embeddings.LlamaCppEmbeddings attribute) (langchain.llms.GPT4All attribute) (langchain.llms.LlamaCpp attribute) W Weaviate (class in langchain.vectorstores) Wikipedia (class in langchain.docstore) Z ZERO_SHOT_REACT_DESCRIPTION (langchain.agents.AgentType attribute) By Harrison Chase © C...
{ "url": "https://python.langchain.com/en/latest/glossary.html" }
e9f602475ea6-0
.md .pdf Glossary Contents Chain of Thought Prompting Action Plan Generation ReAct Prompting Self-ask Prompt Chaining Memetic Proxy Self Consistency Inception MemPrompt Glossary# This is a collection of terminology commonly used when developing LLM applications. It contains reference to external papers or sources whe...
{ "url": "https://python.langchain.com/en/latest/glossary.html" }
e9f602475ea6-1
Language Model Cascades ICE Primer Book Socratic Models Memetic Proxy# Encouraging the LLM to respond in a certain way framing the discussion in a context that the model knows of and that will result in that type of response. For example, as a conversation between a student and a teacher. Resources: Paper Self Consiste...
{ "url": "https://python.langchain.com/en/latest/reference.html" }
f60104d7b9b5-0
.rst .pdf API References API References# All of LangChain’s reference documentation, in one place. Full documentation on all methods, classes, and APIs in LangChain. Prompts Utilities Chains Agents previous Integrations next Utilities By Harrison Chase © Copyright 2023, Harrison Chase. Last updated ...
{ "url": "https://python.langchain.com/en/latest/index.html" }
23852d460fa9-0
.rst .pdf Welcome to LangChain Contents Getting Started Modules Use Cases Reference Docs LangChain Ecosystem Additional Resources Welcome to LangChain# LangChain is a framework for developing applications powered by language models. We believe that the most powerful and differentiated applications will not only call ...
{ "url": "https://python.langchain.com/en/latest/index.html" }
23852d460fa9-1
Agents: Agents involve an LLM making decisions about which Actions to take, taking that Action, seeing an Observation, and repeating that until done. LangChain provides a standard interface for agents, a selection of agents to choose from, and examples of end to end agents. Use Cases# The above modules can be used in a...
{ "url": "https://python.langchain.com/en/latest/index.html" }
23852d460fa9-2
Guides for how other companies/products can be used with LangChain LangChain Ecosystem Additional Resources# Additional collection of resources we think may be useful as you develop your application! LangChainHub: The LangChainHub is a place to share and explore other prompts, chains, and agents. Glossary: A glossary o...
{ "url": "https://python.langchain.com/en/latest/gallery.html" }
8147846d684e-0
.rst .pdf LangChain Gallery Contents Open Source Misc. Colab Notebooks Proprietary LangChain Gallery# Lots of people have built some pretty awesome stuff with LangChain. This is a collection of our favorites. If you see any other demos that you think we should highlight, be sure to let us know! Open Source# HowDoI.ai...
{ "url": "https://python.langchain.com/en/latest/gallery.html" }
8147846d684e-1
Record sounds of anything (birds, wind, fire, train station) and chat with it. ChatGPT LangChain This simple application demonstrates a conversational agent implemented with OpenAI GPT-3.5 and LangChain. When necessary, it leverages tools for complex math, searching the internet, and accessing news and weather. GPT Mat...
{ "url": "https://python.langchain.com/en/latest/gallery.html" }
8147846d684e-2
Daimon A chat-based AI personal assistant with long-term memory about you. AI Assisted SQL Query Generator An app to write SQL using natural language, and execute against real DB. Clerkie Stack Tracing QA Bot to help debug complex stack tracing (especially the ones that go multi-function/file deep). Sales Email Writer ...
{ "url": "https://python.langchain.com/en/latest/ecosystem.html" }
6bc875b46e8e-0
.rst .pdf LangChain Ecosystem LangChain Ecosystem# Guides for how other companies/products can be used with LangChain AI21 Labs Aim Apify AtlasDB Banana CerebriumAI Chroma ClearML Integration Getting API Credentials Setting Up Scenario 1: Just an LLM Scenario 2: Creating a agent with tools Tips and Next Steps Cohere De...
{ "url": "https://python.langchain.com/en/latest/model_laboratory.html" }
edf665b7054b-0
.ipynb .pdf Model Comparison Model Comparison# Constructing your language model application will likely involved choosing between many different options of prompts, models, and even chains to use. When doing so, you will want to compare these different options on different inputs in an easy, flexible, and intuitive way...
{ "url": "https://python.langchain.com/en/latest/model_laboratory.html" }
edf665b7054b-1
pink prompt = PromptTemplate(template="What is the capital of {state}?", input_variables=["state"]) model_lab_with_prompt = ModelLaboratory.from_llms(llms, prompt=prompt) model_lab_with_prompt.compare("New York") Input: New York OpenAI Params: {'model': 'text-davinci-002', 'temperature': 0.0, 'max_tokens': 256, 'top_p'...
{ "url": "https://python.langchain.com/en/latest/model_laboratory.html" }
edf665b7054b-2
names = [str(open_ai_llm), str(cohere_llm)] model_lab = ModelLaboratory(chains, names=names) model_lab.compare("What is the hometown of the reigning men's U.S. Open champion?") Input: What is the hometown of the reigning men's U.S. Open champion? OpenAI Params: {'model': 'text-davinci-002', 'temperature': 0.0, 'max_tok...
{ "url": "https://python.langchain.com/en/latest/model_laboratory.html" }
edf665b7054b-3
So the final answer is: Carlos Alcaraz By Harrison Chase © Copyright 2023, Harrison Chase. Last updated on Apr 08, 2023.
{ "url": "https://python.langchain.com/en/latest/tracing.html" }
3b985276c6a0-0
.md .pdf Tracing Contents Tracing Walkthrough Changing Sessions Tracing# By enabling tracing in your LangChain runs, you’ll be able to more effectively visualize, step through, and debug your chains and agents. First, you should install tracing and set up your environment properly. You can use either a locally hosted...
{ "url": "https://python.langchain.com/en/latest/tracing.html" }
3b985276c6a0-1
Changing Sessions# To initially record traces to a session other than "default", you can set the LANGCHAIN_SESSION environment variable to the name of the session you want to record to: import os os.environ["LANGCHAIN_HANDLER"] = "langchain" os.environ["LANGCHAIN_SESSION"] = "my_session" # Make sure this session actual...
{ "url": "https://python.langchain.com/en/latest/deployments.html" }
166820098a9e-0
.md .pdf Deployments Contents Streamlit Gradio (on Hugging Face) Beam Vercel SteamShip Langchain-serve Deployments# So you’ve made a really cool chain - now what? How do you deploy it and make it easily sharable with the world? This section covers several options for that. Note that these are meant as quick deploymen...
{ "url": "https://python.langchain.com/en/latest/deployments.html" }
166820098a9e-1
This includes: production ready endpoints, horizontal scaling across dependencies, persistant storage of app state, multi-tenancy support, etc. Langchain-serve# This repository allows users to serve local chains and agents as RESTful, gRPC, or Websocket APIs thanks to Jina. Deploy your chains & agents with ease and enj...
{ "url": "https://python.langchain.com/en/latest/search.html" }
4bcfa78caad0-0
Search Error Please activate JavaScript to enable the search functionality. Ctrl+K By Harrison Chase © Copyright 2023, Harrison Chase. Last updated on Apr 08, 2023.
{ "url": "https://python.langchain.com/en/latest/reference/prompts.html" }
29448f94ed77-0
.rst .pdf Prompts Prompts# The reference guides here all relate to objects for working with Prompts. PromptTemplates Example Selector previous How to serialize prompts next PromptTemplates By Harrison Chase © Copyright 2023, Harrison Chase. Last updated on Apr 08, 2023.
{ "url": "https://python.langchain.com/en/latest/reference/integrations.html" }
8e4645c1026b-0
.md .pdf Integrations Integrations# Besides the installation of this python package, you will also need to install packages and set environment variables depending on which chains you want to use. Note: the reason these packages are not included in the dependencies by default is that as we imagine scaling this package,...
{ "url": "https://python.langchain.com/en/latest/reference/integrations.html" }
8e4645c1026b-1
PromptLayer: Install requirements with pip install promptlayer (be sure to be on version 0.1.62 or higher) Get an API key from promptlayer.com and set it using promptlayer.api_key=<API KEY> SerpAPI: Install requirements with pip install google-search-results Get a SerpAPI api key and either set it as an environment var...
{ "url": "https://python.langchain.com/en/latest/reference/integrations.html" }
8e4645c1026b-2
DeepLake: Install requirements with pip install deeplake LlamaCpp: Install requirements with pip install llama-cpp-python Download model and convert following llama.cpp instructions If you are using the NLTKTextSplitter or the SpacyTextSplitter, you will also need to install the appropriate models. For example, if you ...
{ "url": "https://python.langchain.com/en/latest/reference/utils.html" }
fe06cc2bf5ae-0
.rst .pdf Utilities Utilities# There are a lot of different utilities that LangChain provides integrations for These guides go over how to use them. These can largely be grouped into two categories: generic utilities, and then utilities for working with larger text documents. Generic Utilities Python REPL SerpAPI Searx...
{ "url": "https://python.langchain.com/en/latest/reference/installation.html" }
9554fbc7ebe9-0
.md .pdf Installation Contents Official Releases Installing from source Installation# Official Releases# LangChain is available on PyPi, so to it is easily installable with: pip install langchain That will install the bare minimum requirements of LangChain. A lot of the value of LangChain comes when integrating it wi...
{ "url": "https://python.langchain.com/en/latest/reference/modules/python.html" }
6a22d5789610-0
.rst .pdf Python REPL Python REPL# Mock Python REPL. pydantic model langchain.python.PythonREPL[source]# Simulates a standalone Python REPL. field globals: Optional[Dict] [Optional] (alias '_globals')# field locals: Optional[Dict] [Optional] (alias '_locals')# run(command: str) → str[source]# Run command with own globa...
{ "url": "https://python.langchain.com/en/latest/reference/modules/example_selector.html" }
682d8972ff00-0
.rst .pdf Example Selector Example Selector# Logic for selecting examples to include in prompts. pydantic model langchain.prompts.example_selector.LengthBasedExampleSelector[source]# Select examples based on length. Validators calculate_example_text_lengths » example_text_lengths field example_prompt: langchain.prompts...
{ "url": "https://python.langchain.com/en/latest/reference/modules/example_selector.html" }
682d8972ff00-1
Create k-shot example selector using example list and embeddings. Reshuffles examples dynamically based on query similarity. Parameters examples – List of examples to use in the prompt. embeddings – An iniialized embedding API interface, e.g. OpenAIEmbeddings(). vectorstore_cls – A vector store DB interface class, e.g....
{ "url": "https://python.langchain.com/en/latest/reference/modules/example_selector.html" }
682d8972ff00-2
Create k-shot example selector using example list and embeddings. Reshuffles examples dynamically based on query similarity. Parameters examples – List of examples to use in the prompt. embeddings – An iniialized embedding API interface, e.g. OpenAIEmbeddings(). vectorstore_cls – A vector store DB interface class, e.g....
{ "url": "https://python.langchain.com/en/latest/reference/modules/embeddings.html" }
f9d90154b39f-0
.rst .pdf Embeddings Embeddings# Wrappers around embedding modules. pydantic model langchain.embeddings.AlephAlphaAsymmetricSemanticEmbedding[source]# Wrapper for Aleph Alpha’s Asymmetric Embeddings AA provides you with an endpoint to embed a document and a query. The models were optimized to make the embeddings of doc...
{ "url": "https://python.langchain.com/en/latest/reference/modules/embeddings.html" }
f9d90154b39f-1
Parameters texts – The list of texts to embed. Returns List of embeddings, one for each text. embed_query(text: str) → List[float][source]# Call out to Aleph Alpha’s asymmetric, query embedding endpoint :param text: The text to embed. Returns Embeddings for the text. pydantic model langchain.embeddings.AlephAlphaSymmet...
{ "url": "https://python.langchain.com/en/latest/reference/modules/embeddings.html" }
f9d90154b39f-2
embed_documents(texts: List[str]) → List[List[float]][source]# Call out to Cohere’s embedding endpoint. Parameters texts – The list of texts to embed. Returns List of embeddings, one for each text. embed_query(text: str) → List[float][source]# Call out to Cohere’s embedding endpoint. Parameters text – The text to embed...
{ "url": "https://python.langchain.com/en/latest/reference/modules/embeddings.html" }
f9d90154b39f-3
Wrapper around HuggingFaceHub embedding models. To use, you should have the huggingface_hub python package installed, and the environment variable HUGGINGFACEHUB_API_TOKEN set with your API token, or pass it as a named parameter to the constructor. Example from langchain.embeddings import HuggingFaceHubEmbeddings repo_...
{ "url": "https://python.langchain.com/en/latest/reference/modules/embeddings.html" }
f9d90154b39f-4
hf = HuggingFaceInstructEmbeddings(model_name=model_name) field embed_instruction: str = 'Represent the document for retrieval: '# Instruction to use for embedding documents. field model_name: str = 'hkunlp/instructor-large'# Model name to use. field query_instruction: str = 'Represent the question for retrieving suppo...
{ "url": "https://python.langchain.com/en/latest/reference/modules/embeddings.html" }
f9d90154b39f-5
field n_parts: int = -1# Number of parts to split the model into. If -1, the number of parts is automatically determined. field n_threads: Optional[int] = None# Number of threads to use. If None, the number of threads is automatically determined. field seed: int = -1# Seed. If -1, a random seed is used. field use_mlock...
{ "url": "https://python.langchain.com/en/latest/reference/modules/embeddings.html" }
f9d90154b39f-6
In addition, the deployment name must be passed as the model parameter. Example import os os.environ["OPENAI_API_TYPE"] = "azure" os.environ["OPENAI_API_BASE"] = "https://<your-endpoint.openai.azure.com/" os.environ["OPENAI_API_KEY"] = "your AzureOpenAI key" from langchain.embeddings.openai import OpenAIEmbeddings embe...
{ "url": "https://python.langchain.com/en/latest/reference/modules/embeddings.html" }
f9d90154b39f-7
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html If a specific credential profile should be used, you must pass the name of the profile from the ~/.aws/credentials file that is to be used. Make sure the credentials / roles used have the required policies to access the Sagemaker endpoint. S...
{ "url": "https://python.langchain.com/en/latest/reference/modules/embeddings.html" }
f9d90154b39f-8
Compute doc embeddings using a SageMaker Inference Endpoint. Parameters texts – The list of texts to embed. chunk_size – The chunk size defines how many input texts will be grouped together as request. If None, will use the chunk size specified by the class. Returns List of embeddings, one for each text. embed_query(te...
{ "url": "https://python.langchain.com/en/latest/reference/modules/embeddings.html" }
f9d90154b39f-9
import runhouse as rh from transformers import pipeline gpu = rh.cluster(name="rh-a10x", instance_type="A100:1") pipeline = pipeline(model="bert-base-uncased", task="feature-extraction") rh.blob(pickle.dumps(pipeline), path="models/pipeline.pkl").save().to(gpu, path="models") embeddings = SelfHostedHFEmbeddings.fro...
{ "url": "https://python.langchain.com/en/latest/reference/modules/embeddings.html" }
f9d90154b39f-10
Example from langchain.embeddings import SelfHostedHuggingFaceEmbeddings import runhouse as rh model_name = "sentence-transformers/all-mpnet-base-v2" gpu = rh.cluster(name="rh-a10x", instance_type="A100:1") hf = SelfHostedHuggingFaceEmbeddings(model_name=model_name, hardware=gpu) Validators set_callback_manager » callb...
{ "url": "https://python.langchain.com/en/latest/reference/modules/embeddings.html" }
f9d90154b39f-11
gpu = rh.cluster(name='rh-a10x', instance_type='A100:1') hf = SelfHostedHuggingFaceInstructEmbeddings( model_name=model_name, hardware=gpu) Validators set_callback_manager » callback_manager set_verbose » verbose field embed_instruction: str = 'Represent the document for retrieval: '# Instruction to use for embeddi...
{ "url": "https://python.langchain.com/en/latest/reference/modules/embeddings.html" }
f9d90154b39f-12
embed_documents(texts: List[str]) → List[List[float]][source]# Compute doc embeddings using a TensorflowHub embedding model. Parameters texts – The list of texts to embed. Returns List of embeddings, one for each text. embed_query(text: str) → List[float][source]# Compute query embeddings using a TensorflowHub embeddin...
{ "url": "https://python.langchain.com/en/latest/reference/modules/text_splitter.html" }
c7562d5f5ebd-0
.rst .pdf Text Splitter Text Splitter# Functionality for splitting text. class langchain.text_splitter.CharacterTextSplitter(separator: str = '\n\n', **kwargs: Any)[source]# Implementation of splitting text that looks at characters. split_text(text: str) → List[str][source]# Split incoming text and return chunks. class...
{ "url": "https://python.langchain.com/en/latest/reference/modules/text_splitter.html" }
c7562d5f5ebd-1
Split incoming text and return chunks. class langchain.text_splitter.TextSplitter(chunk_size: int = 4000, chunk_overlap: int = 200, length_function: typing.Callable[[str], int] = <built-in function len>)[source]# Interface for splitting text into chunks. create_documents(texts: List[str], metadatas: Optional[List[dict]...
{ "url": "https://python.langchain.com/en/latest/reference/modules/text_splitter.html" }
c7562d5f5ebd-2
By Harrison Chase © Copyright 2023, Harrison Chase. Last updated on Apr 08, 2023.
{ "url": "https://python.langchain.com/en/latest/reference/modules/vectorstore.html" }
423a5ff855c1-0
.rst .pdf VectorStores VectorStores# Wrappers on top of vector stores. class langchain.vectorstores.AtlasDB(name: str, embedding_function: Optional[langchain.embeddings.base.Embeddings] = None, api_key: Optional[str] = None, description: str = 'A description for your project', is_public: bool = True, reset_project_if_e...
{ "url": "https://python.langchain.com/en/latest/reference/modules/vectorstore.html" }
423a5ff855c1-1
for full detail. classmethod from_documents(documents: List[langchain.schema.Document], embedding: Optional[langchain.embeddings.base.Embeddings] = None, ids: Optional[List[str]] = None, name: Optional[str] = None, api_key: Optional[str] = None, persist_directory: Optional[str] = None, description: str = 'A description...
{ "url": "https://python.langchain.com/en/latest/reference/modules/vectorstore.html" }
423a5ff855c1-2
Returns Nomic’s neural database and finest rhizomatic instrument Return type AtlasDB classmethod from_texts(texts: List[str], embedding: Optional[langchain.embeddings.base.Embeddings] = None, metadatas: Optional[List[dict]] = None, ids: Optional[List[str]] = None, name: Optional[str] = None, api_key: Optional[str] = No...
{ "url": "https://python.langchain.com/en/latest/reference/modules/vectorstore.html" }
423a5ff855c1-3
Run similarity search with AtlasDB Parameters query (str) – Query text to search for. k (int) – Number of results to return. Defaults to 4. Returns List of documents most similar to the query text. Return type List[Document] class langchain.vectorstores.Chroma(collection_name: str = 'langchain', embedding_function: Opt...
{ "url": "https://python.langchain.com/en/latest/reference/modules/vectorstore.html" }
423a5ff855c1-4
Create a Chroma vectorstore from a list of documents. If a persist_directory is specified, the collection will be persisted there. Otherwise, the data will be ephemeral in-memory. Parameters collection_name (str) – Name of the collection to create. persist_directory (Optional[str]) – Directory to persist the collection...
{ "url": "https://python.langchain.com/en/latest/reference/modules/vectorstore.html" }
423a5ff855c1-5
Returns Chroma vectorstore. Return type Chroma max_marginal_relevance_search(query: str, k: int = 4, fetch_k: int = 20, filter: Optional[Dict[str, str]] = None) → List[langchain.schema.Document][source]# Return docs selected using the maximal marginal relevance. Maximal marginal relevance optimizes for similarity to qu...
{ "url": "https://python.langchain.com/en/latest/reference/modules/vectorstore.html" }
423a5ff855c1-6
It will also be called automatically when the object is destroyed. similarity_search(query: str, k: int = 4, filter: Optional[Dict[str, str]] = None, **kwargs: Any) → List[langchain.schema.Document][source]# Run similarity search with Chroma. Parameters query (str) – Query text to search for. k (int) – Number of result...
{ "url": "https://python.langchain.com/en/latest/reference/modules/vectorstore.html" }
423a5ff855c1-7
Return type List[Tuple[Document, float]] class langchain.vectorstores.DeepLake(dataset_path: str = 'mem://langchain', token: Optional[str] = None, embedding_function: Optional[langchain.embeddings.base.Embeddings] = None, read_only: Optional[bool] = None)[source]# Wrapper around Deep Lake, a data lake for deep learning...
{ "url": "https://python.langchain.com/en/latest/reference/modules/vectorstore.html" }
423a5ff855c1-8
Returns List of IDs of the added texts. Return type List[str] delete(ids: Any[List[str], None] = None, filter: Any[Dict[str, str], None] = None, delete_all: Any[bool, None] = None) → bool[source]# Delete the entities in the dataset Parameters ids (Optional[List[str]], optional) – The document_ids to delete. Defaults to...
{ "url": "https://python.langchain.com/en/latest/reference/modules/vectorstore.html" }
423a5ff855c1-9
in either the environment Local file system path of the form ./path/to/dataset or~/path/to/dataset or path/to/dataset. In-memory path of the form mem://path/to/dataset which doesn’tsave the dataset, but keeps it in memory instead. Should be used only for testing as it does not persist. documents (List[Document]) – List...
{ "url": "https://python.langchain.com/en/latest/reference/modules/vectorstore.html" }
423a5ff855c1-10
Returns List of Documents selected by maximal marginal relevance. persist() → None[source]# Persist the collection. search(query: Any[str, None] = None, embedding: Any[float, None] = None, k: int = 4, distance_metric: str = 'L2', use_maximal_marginal_relevance: Optional[bool] = False, fetch_k: Optional[int] = 20, filte...
{ "url": "https://python.langchain.com/en/latest/reference/modules/vectorstore.html" }
423a5ff855c1-11
k – Number of Documents to return. Defaults to 4. query – Text to look up documents similar to. embedding – Embedding function to use. Defaults to None. k – Number of Documents to return. Defaults to 4. distance_metric – L2 for Euclidean, L1 for Nuclear, max L-infinity distance, cos for cosine similarity, ‘dot’ for dot...
{ "url": "https://python.langchain.com/en/latest/reference/modules/vectorstore.html" }
423a5ff855c1-12
distance, cos for cosine similarity, ‘dot’ for dot product. Defaults to L2. k (int) – Number of results to return. Defaults to 4. filter (Optional[Dict[str, str]]) – Filter by metadata. Defaults to None. Returns List of documents most similar to the querytext with distance in float. Return type List[Tuple[Document, flo...
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
3