id stringlengths 14 15 | text stringlengths 8 2.08k | source stringclasses 1
value |
|---|---|---|
fd0fa414031d-0 | Introduction | 🦜️🔗 Langchain | https://python.langchain.com/docs/get_started |
fd0fa414031d-1 | Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionChainsMemoryAgentsCallbacksModulesUse casesGuidesEcosystemAdditional resourcesAPI referenceGet startedIntroductionOn this pageIntroductionLangChain is a framework for developing applicati... | https://python.langchain.com/docs/get_started |
fd0fa414031d-2 | questions using sourcesAnalyzing structured dataand much more...GuidesLearn best practices for developing with LangChain.EcosystemLangChain is part of a rich ecosystem of tools that integrate with our framework and build on top of it. Check out our growing list of integrations and dependent repos.Additional resources... | https://python.langchain.com/docs/get_started |
fd0fa414031d-3 | Overview | https://python.langchain.com/docs/get_started |
fd0fa414031d-4 | Jump to ContentLearnForumSupportSystem StatusContactGuidesAPI ReferenceExamplesLibrariesLearnForumSupportSystem StatusContactLog InSign Up FreeLog InSign Up FreeGuidesAPI ReferenceExamplesLibrariesAIGetting startedOverviewQuickstartExamplesChoosing index type and sizeorganizationsUnderstanding organizationsManaging cos... | https://python.langchain.com/docs/get_started |
fd0fa414031d-5 | Vector databases store and query embeddings quickly and at scale.
Vector databases like Pinecone offer optimized storage and querying capabilities for embeddings. Traditional scalar-based databases can’t keep up with the complexity and scale of such data, making it difficult to extract insights and perform real-time an... | https://python.langchain.com/docs/get_started |
fd0fa414031d-6 | upsert_response = index.upsert(
vectors=[
{'id': 'vec1',
'values': [0.1, 0.2, 0.3],
'metadata': {'genre': 'drama'},
'sparse_values': {
'indices': [10, 45, 16],
'values': [0.5, 0.5, 0.2]
}},
{'id': 'vec2',
'values': [0.2, 0.3, 0.4... | https://python.langchain.com/docs/get_started |
fd0fa414031d-7 | Find the top k most similar vectors, or query by ID.
PythonJavaScriptcurlindex.query(
vector=[0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3],
top_k=3,
include_values=True
)
# Returns:
# {'matches': [{'id': 'C',
# 'score': -1.76717265e-07,
# 'values': [0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3]}... | https://python.langchain.com/docs/get_started |
fd0fa414031d-8 | // Returns:
// {'matches': [{'id': 'C',
// 'score': -1.76717265e-07,
// 'values': [0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3]},
// {'id': 'B',
// 'score': 0.080000028,
// 'values': [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2]},
// ... | https://python.langchain.com/docs/get_started |
fd0fa414031d-9 | Get started
Go to the quickstart guide to get a production-ready vector search service up and running in minutes.Updated about 18 hours ago Table of Contents
Pinecone Overview
Vector embeddings provide long-term memory for AI.
Vector databases store and query embeddings quickly and at scale.
Pinecone indexes store reco... | https://python.langchain.com/docs/get_started |
fd0fa414031d-10 | Foundational | 🦜️🔗 Langchain
Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionChainsHow toFoundationalLLMRouterSequentialTransformationDocumentsPopularAdditionalMemoryAgentsCallbacksModulesUse casesGuidesEcosystemAdditional resou... | https://python.langchain.com/docs/get_started |
fd0fa414031d-11 | Popular | 🦜️🔗 Langchain
Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionChainsHow toFoundationalDocumentsPopularAPI chainsRetrieval QAConversational Retrieval QASQLSummarizationAdditionalMemoryAgentsCallbacksModulesUse casesGuid... | https://python.langchain.com/docs/get_started |
fd0fa414031d-12 | Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionChainsHow toFoundationalDocumentsPopularAdditionalAnalyze DocumentSelf-critique chain with constitutional AIExtractionFLAREGraph DB QA chainKuzuQAChainNebulaGraphQAChainGraph QAHypothetic... | https://python.langchain.com/docs/get_started |
fd0fa414031d-13 | FLAREThis notebook is an implementation of Forward-Looking Active REtrieval augmented generation (FLARE).📄️ Graph DB QA chainThis notebook shows how to use LLMs to provide a natural language interface to a graph database you can query with the Cypher query language.📄️ KuzuQAChainThis notebook shows how to use LLMs to... | https://python.langchain.com/docs/get_started |
fd0fa414031d-14 | on both user input, but also on the output of a Language Model. Some API providers, like OpenAI, specifically prohibit you, or your end users, from generating some types of harmful content. To comply with this (and to just generally prevent your application from being harmful) you may often want to append a moderation ... | https://python.langchain.com/docs/get_started |
fd0fa414031d-15 | that the OpenAI functions API can handle. This allows ChatGPT to automatically select and populate the relevant API call to make for any user input. Using the output of ChatGPT we then make the actual API call, and return the result.📄️ Program-aided language model (PAL) chainImplements Program-Aided Language Models, a... | https://python.langchain.com/docs/get_started |
fd0fa414031d-16 | How to | 🦜️🔗 Langchain
Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionChainsHow toAsync APIDifferent call methodsCustom chainDebugging chainsLoading from LangChainHubAdding memory (state)SerializationFoundationalDocumentsPopula... | https://python.langchain.com/docs/get_started |
fd0fa414031d-17 | Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionChainsHow toFoundationalDocumentsPopularAdditionalMemoryAgentsCallbacksModulesUse casesGuidesEcosystemAdditional resourcesAPI referenceModulesChainsOn this pageChainsUsing an LLM in isola... | https://python.langchain.com/docs/get_started |
fd0fa414031d-18 | but more complex applications require chaining LLMs - either with each other or with other components.LangChain provides the Chain interface for such "chained" applications. We define a Chain very generically as a sequence of calls to components, which can include other chains. The base interface is simple:class Chain(... | https://python.langchain.com/docs/get_started |
fd0fa414031d-19 | returns the response from an LLM.To use the LLMChain, first create a prompt template.from langchain.llms import OpenAIfrom langchain.prompts import PromptTemplatellm = OpenAI(temperature=0.9)prompt = PromptTemplate( input_variables=["product"], template="What is a good name for a company that makes {product}?",)W... | https://python.langchain.com/docs/get_started |
fd0fa414031d-20 | ) )chat_prompt_template = ChatPromptTemplate.from_messages([human_message_prompt])chat = ChatOpenAI(temperature=0.9)chain = LLMChain(llm=chat, prompt=chat_prompt_template)print(chain.run("colorful socks")) Rainbow Socks Co.Edit this pagePreviousZepNextHow toWhy do we need chains?Get startedCommunityDiscordTwitter... | https://python.langchain.com/docs/get_started |
fd0fa414031d-21 | Documents | 🦜️🔗 Langchain | https://python.langchain.com/docs/get_started |
fd0fa414031d-22 | Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionChainsHow toFoundationalDocumentsStuffRefineMap reduceMap re-rankPopularAdditionalMemoryAgentsCallbacksModulesUse casesGuidesEcosystemAdditional resourcesAPI referenceModulesChainsDocumen... | https://python.langchain.com/docs/get_started |
fd0fa414031d-23 | This compression step is performed recursively if necessary.📄️ Map re-rankThe map re-rank documents chain runs an initial prompt on each document, that not only tries to complete a task but also gives a score for how certain it is in its answer. The highest scoring response is returned.Edit this pagePreviousTransforma... | https://python.langchain.com/docs/get_started |
fd0fa414031d-24 | LLMs | 🦜️🔗 Langchain | https://python.langchain.com/docs/get_started |
fd0fa414031d-25 | Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OPromptsLanguage modelsLLMsHow-toIntegrationsChat modelsOutput parsersData connectionChainsMemoryAgentsCallbacksModulesUse casesGuidesEcosystemAdditional resourcesAPI referenceModulesModel I/OLanguage m... | https://python.langchain.com/docs/get_started |
fd0fa414031d-26 | LangChain does not serve it's own LLMs, but rather provides a standard interface for interacting with many different LLMs.For more detailed documentation check out our:How-to guides: Walkthroughs of core functionality, like streaming, async, etc.Integrations: How to use different LLM providers (OpenAI, Anthropic, etc.)... | https://python.langchain.com/docs/get_started |
fd0fa414031d-27 | other LLM provider-specific information:llm_result = llm.generate(["Tell me a joke", "Tell me a poem"]*15)len(llm_result.generations) 30llm_result.generations[0] [Generation(text='\n\nWhy did the chicken cross the road?\n\nTo get to the other side!'), Generation(text='\n\nWhy did the chicken cross the road?\n... | https://python.langchain.com/docs/get_started |
fd0fa414031d-28 | modelsNextAsync APIGet startedCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright © 2023 LangChain, Inc. | https://python.langchain.com/docs/get_started |
fd0fa414031d-29 | Chat models | 🦜️🔗 Langchain | https://python.langchain.com/docs/get_started |
fd0fa414031d-30 | Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OPromptsLanguage modelsLLMsChat modelsHow-toIntegrationsOutput parsersData connectionChainsMemoryAgentsCallbacksModulesUse casesGuidesEcosystemAdditional resourcesAPI referenceModulesModel I/OLanguage m... | https://python.langchain.com/docs/get_started |
fd0fa414031d-31 | The types of messages currently supported in LangChain are AIMessage, HumanMessage, SystemMessage, and ChatMessage -- ChatMessage takes in an arbitrary role parameter. Most of the time, you'll just be dealing with HumanMessage, AIMessage, and SystemMessage__call__Messages in -> message outYou can get chat completions... | https://python.langchain.com/docs/get_started |
fd0fa414031d-32 | LLMResult(generations=[[ChatGeneration(text="J'aime programmer.", generation_info=None, message=AIMessage(content="J'aime programmer.", additional_kwargs={}))], [ChatGeneration(text="J'aime l'intelligence artificielle.", generation_info=None, message=AIMessage(content="J'aime l'intelligence artificielle.", additional_k... | https://python.langchain.com/docs/get_started |
fd0fa414031d-33 | Language models | 🦜️🔗 Langchain | https://python.langchain.com/docs/get_started |
fd0fa414031d-34 | Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OPromptsLanguage modelsLLMsChat modelsOutput parsersData connectionChainsMemoryAgentsCallbacksModulesUse casesGuidesEcosystemAdditional resourcesAPI referenceModulesModel I/OLanguage modelsOn this pageL... | https://python.langchain.com/docs/get_started |
fd0fa414031d-35 | but if you're creating an application that should work with different types of models the shared interface can be helpful.Edit this pagePreviousSelect by similarityNextLLMsLLMs vs Chat ModelsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright © 2023 LangChain, Inc. | https://python.langchain.com/docs/get_started |
fd0fa414031d-36 | Output parsers | 🦜️🔗 Langchain | https://python.langchain.com/docs/get_started |
fd0fa414031d-37 | Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OPromptsLanguage modelsOutput parsersList parserDatetime parserEnum parserAuto-fixing parserPydantic (JSON) parserRetry parserStructured output parserData connectionChainsMemoryAgentsCallbacksModulesUse ... | https://python.langchain.com/docs/get_started |
fd0fa414031d-38 | temperature=temperature)# Define your desired data structure.class Joke(BaseModel): setup: str = Field(description="question to set up a joke") punchline: str = Field(description="answer to resolve the joke") # You can add custom validation logic easily with Pydantic. @validator('setup') def question... | https://python.langchain.com/docs/get_started |
fd0fa414031d-39 | Prompt templates | 🦜️🔗 Langchain | https://python.langchain.com/docs/get_started |
fd0fa414031d-40 | Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OPromptsPrompt templatesConnecting to a Feature StoreCustom prompt templateFew-shot prompt templatesFew shot examples for chat modelsFormat template outputTemplate formatsTypes of MessagePromptTemplatePa... | https://python.langchain.com/docs/get_started |
fd0fa414031d-41 | LangChain provides several classes and functions to make constructing and working with prompts easy.What is a prompt template?A prompt template refers to a reproducible way to generate a prompt. It contains a text string ("the template"), that can take in a set of parameters from the end user and generates a prompt.A ... | https://python.langchain.com/docs/get_started |
fd0fa414031d-42 | you do not wish to specify input_variables manually, you can also create a PromptTemplate using from_template class method. langchain will automatically infer the input_variables based on the template passed.template = "Tell me a {adjective} joke about {content}."prompt_template = PromptTemplate.from_template(template)... | https://python.langchain.com/docs/get_started |
fd0fa414031d-43 | These chat messages differ from raw string (which you would pass into a LLM model) in that every message is associated with a role.For example, in OpenAI Chat Completion API, a chat message can be associated with the AI, human or system role. The model is supposed to follow instruction from system chat message more clo... | https://python.langchain.com/docs/get_started |
fd0fa414031d-44 | You can use ChatPromptTemplate's format_prompt -- this returns a PromptValue, which you can convert to a string or Message object, depending on whether you want to use the formatted value as input to an llm or chat model.chat_prompt = ChatPromptTemplate.from_messages([system_message_prompt, human_message_prompt])# get ... | https://python.langchain.com/docs/get_started |
fd0fa414031d-45 | Example selectors | 🦜️🔗 Langchain
Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OPromptsPrompt templatesExample selectorsCustom example selectorSelect by lengthSelect by maximal marginal relevance (MMR)Select by n-gram overlapSelect by simila... | https://python.langchain.com/docs/get_started |
fd0fa414031d-46 | Prompts | 🦜️🔗 Langchain
Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OPromptsPrompt templatesExample selectorsLanguage modelsOutput parsersData connectionChainsMemoryAgentsCallbacksModulesUse casesGuidesEcosystemAdditional resourcesAPI refer... | https://python.langchain.com/docs/get_started |
fd0fa414031d-47 | Tools | 🦜️🔗 Langchain
Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionChainsMemoryAgentsAgent typesHow-toToolsHow-toIntegrationsToolkitsCallbacksModulesUse casesGuidesEcosystemAdditional resourcesAPI referenceModulesAgentsToolsO... | https://python.langchain.com/docs/get_started |
fd0fa414031d-48 | Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionChainsMemoryAgentsAgent typesConversationalOpenAI functionsOpenAI Multi Functions AgentPlan and executeReActReAct document storeSelf ask with searchStructured tool chatHow-toToolsToolkits... | https://python.langchain.com/docs/get_started |
fd0fa414031d-49 | The prompt is designed to make the agent helpful and conversational.
It uses the ReAct framework to decide which tool to use, and uses memory to remember the previous conversation interactions.Self ask with searchThis agent utilizes a single tool that should be named Intermediate Answer.
This tool should be able to lo... | https://python.langchain.com/docs/get_started |
fd0fa414031d-50 | Toolkits | 🦜️🔗 Langchain | https://python.langchain.com/docs/get_started |
fd0fa414031d-51 | Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionChainsMemoryAgentsAgent typesHow-toToolsToolkitsAzure Cognitive Services ToolkitCSV AgentDocument ComparisonGmail ToolkitJiraJSON AgentOffice365 ToolkitOpenAPI agentsNatural Language APIs... | https://python.langchain.com/docs/get_started |
fd0fa414031d-52 | API Toolkits (NLAToolkits) permit LangChain Agents to efficiently plan and combine calls across endpoints. This notebook demonstrates a sample composition of the Speak, Klarna, and Spoonacluar APIs.📄️ Pandas Dataframe AgentThis notebook shows how to use agents to interact with a pandas dataframe. It is mostly optimize... | https://python.langchain.com/docs/get_started |
fd0fa414031d-53 | Agents | 🦜️🔗 Langchain | https://python.langchain.com/docs/get_started |
fd0fa414031d-54 | Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionChainsMemoryAgentsAgent typesHow-toToolsToolkitsCallbacksModulesUse casesGuidesEcosystemAdditional resourcesAPI referenceModulesAgentsOn this pageAgentsSome applications require a flexibl... | https://python.langchain.com/docs/get_started |
fd0fa414031d-55 | interact with a SQL database it will likely need one tool to execute queries and another to inspect tablesAction agentsAt a high-level an action agent:Receives user inputDecides which tool, if any, to use and the tool inputCalls the tool and records the output (also known as an "observation")Decides the next step usin... | https://python.langchain.com/docs/get_started |
fd0fa414031d-56 | to send to the language modelLanguage model: Takes the prompt with use input and action history and decides what to do nextOutput parser: Takes the output of the language model and parses it into the next action or a final answerPlan-and-execute agentsAt a high-level a plan-and-execute agent:Receives user inputPlans t... | https://python.langchain.com/docs/get_started |
fd0fa414031d-57 | girlfriend" Observation: Camila Morrone Thought: I need to find out Camila Morrone's age Action: Search Action Input: "Camila Morrone age" Observation: 25 years Thought: I need to calculate 25 raised to the 0.43 power Action: Calculator Action Input: 25^0.43 Observation: Answer: 3.99129845265... | https://python.langchain.com/docs/get_started |
fd0fa414031d-58 | Callbacks | 🦜️🔗 Langchain | https://python.langchain.com/docs/get_started |
fd0fa414031d-59 | Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionChainsMemoryAgentsCallbacksHow-toIntegrationsModulesUse casesGuidesEcosystemAdditional resourcesAPI referenceModulesCallbacksCallbacksLangChain provides a callbacks system that allows you... | https://python.langchain.com/docs/get_started |
fd0fa414031d-60 | -> Any: """Run when LLM ends running.""" def on_llm_error( self, error: Union[Exception, KeyboardInterrupt], **kwargs: Any ) -> Any: """Run when LLM errors.""" def on_chain_start( self, serialized: Dict[str, Any], inputs: Dict[str, Any], **kwargs: Any ) -> Any: """Run when... | https://python.langchain.com/docs/get_started |
fd0fa414031d-61 | arbitrary text.""" def on_agent_action(self, action: AgentAction, **kwargs: Any) -> Any: """Run on agent action.""" def on_agent_finish(self, finish: AgentFinish, **kwargs: Any) -> Any: """Run on agent end."""Get startedLangChain provides a few built-in handlers that you can use to get started. The... | https://python.langchain.com/docs/get_started |
fd0fa414031d-62 | > Entering new LLMChain chain... Prompt after formatting: 1 + 2 = > Finished chain. > Entering new LLMChain chain... Prompt after formatting: 1 + 2 = > Finished chain. '\n\n3'Where to pass in callbacksThe callbacks argument is available on most objects throughout the API (Chai... | https://python.langchain.com/docs/get_started |
fd0fa414031d-63 | etc., which are not specific to a single request, but rather to the entire chain. For example, if you want to log all the requests made to an LLMChain, you would pass a handler to the constructor.Request callbacks are most useful for use cases such as streaming, where you want to stream the output of a single request t... | https://python.langchain.com/docs/get_started |
fd0fa414031d-64 | Memory | 🦜️🔗 Langchain | https://python.langchain.com/docs/get_started |
fd0fa414031d-65 | Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionChainsMemoryHow-toIntegrationsAgentsCallbacksModulesUse casesGuidesEcosystemAdditional resourcesAPI referenceModulesMemoryOn this pageMemory🚧 Docs under construction 🚧By default, Chains... | https://python.langchain.com/docs/get_started |
fd0fa414031d-66 | Secondly, LangChain provides easy ways to incorporate these utilities into chains.Get startedMemory involves keeping a concept of state around throughout a user's interactions with an language model. A user's interactions with a language model are captured in the concept of ChatMessages, so this boils down to ingestin... | https://python.langchain.com/docs/get_started |
fd0fa414031d-67 | use this simple concept in a chain. We first showcase ConversationBufferMemory which is just a wrapper around ChatMessageHistory that extracts the messages in a variable.We can first extract it as a string.from langchain.memory import ConversationBufferMemorymemory = ConversationBufferMemory()memory.chat_memory.add_use... | https://python.langchain.com/docs/get_started |
fd0fa414031d-68 | How can I help you today?"conversation.predict(input="I'm doing well! Just having a conversation with an AI.") > Entering new ConversationChain chain... Prompt after formatting: The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from it... | https://python.langchain.com/docs/get_started |
fd0fa414031d-69 | I'm an AI created to help people with their everyday tasks. I'm programmed to understand natural language and provide helpful information. I'm also constantly learning and updating my knowledge base so I can provide more accurate and helpful answers."Saving Message HistoryYou may often have to save messages, and then ... | https://python.langchain.com/docs/get_started |
fd0fa414031d-70 | Modules | 🦜️🔗 Langchain
Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionChainsMemoryAgentsCallbacksModulesUse casesGuidesEcosystemAdditional resourcesAPI referenceModulesOn this pageModulesLangChain provides standard, extendable... | https://python.langchain.com/docs/get_started |
fd0fa414031d-71 | Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionDocument loadersDocument transformersText embedding modelsIntegrationsVector storesRetrieversChainsMemoryAgentsCallbacksModulesUse casesGuidesEcosystemAdditional resourcesAPI referenceMod... | https://python.langchain.com/docs/get_started |
fd0fa414031d-72 | can initialize without any params:from langchain.embeddings import OpenAIEmbeddingsembeddings_model = OpenAIEmbeddings()embed_documentsEmbed list of textsembeddings = embedding_model.embed_documents( [ "Hi there!", "Oh, hello!", "What's your name?", "My friends call me World", "H... | https://python.langchain.com/docs/get_started |
fd0fa414031d-73 | Document loaders | 🦜️🔗 Langchain | https://python.langchain.com/docs/get_started |
fd0fa414031d-74 | Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionDocument loadersHow-toIntegrationsDocument transformersText embedding modelsVector storesRetrieversChainsMemoryAgentsCallbacksModulesUse casesGuidesEcosystemAdditional resourcesAPI refere... | https://python.langchain.com/docs/get_started |
fd0fa414031d-75 | implement a "lazy load" as well for lazily loading data into memory.Get startedThe simplest loader reads in a file as text and places it all into one Document.from langchain.document_loaders import TextLoaderloader = TextLoader("./index.md")loader.load()[ Document(page_content='---\nsidebar_position: 0\n---\n# Docu... | https://python.langchain.com/docs/get_started |
fd0fa414031d-76 | Document transformers | 🦜️🔗 Langchain | https://python.langchain.com/docs/get_started |
fd0fa414031d-77 | Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionDocument loadersDocument transformersText splittersText embedding modelsVector storesRetrieversChainsMemoryAgentsCallbacksModulesUse casesGuidesEcosystemAdditional resourcesAPI referenceM... | https://python.langchain.com/docs/get_started |
fd0fa414031d-78 | This notebook showcases several ways to do that.At a high level, text splitters work as following:Split the text up into small, semantically meaningful chunks (often sentences).Start combining these small chunks into a larger chunk until you reach a certain size (as measured by some function).Once you reach that size, ... | https://python.langchain.com/docs/get_started |
fd0fa414031d-79 | small chunk size, just to show. chunk_size = 100, chunk_overlap = 20, length_function = len, add_start_index = True,)texts = text_splitter.create_documents([state_of_the_union])print(texts[0])print(texts[1]) page_content='Madam Speaker, Madam Vice President, our First Lady and Second Gentleman. Members ... | https://python.langchain.com/docs/get_started |
fd0fa414031d-80 | Vector stores | 🦜️🔗 Langchain | https://python.langchain.com/docs/get_started |
fd0fa414031d-81 | Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionDocument loadersDocument transformersText embedding modelsVector storesIntegrationsRetrieversChainsMemoryAgentsCallbacksModulesUse casesGuidesEcosystemAdditional resourcesAPI referenceMod... | https://python.langchain.com/docs/get_started |
fd0fa414031d-82 | for you.Get startedThis walkthrough showcases basic functionality related to VectorStores. A key part of working with vector stores is creating the vector to put in them, which is usually created via embeddings. Therefore, it is recommended that you familiarize yourself with the text embedding model interfaces before ... | https://python.langchain.com/docs/get_started |
fd0fa414031d-83 | has is nominating someone to serve on the United States Supreme Court. And I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.Similarity search by vectorIt is also possible to do a... | https://python.langchain.com/docs/get_started |
fd0fa414031d-84 | Retrievers | 🦜️🔗 Langchain | https://python.langchain.com/docs/get_started |
fd0fa414031d-85 | Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionDocument loadersDocument transformersText embedding modelsVector storesRetrieversHow-toIntegrationsChainsMemoryAgentsCallbacksModulesUse casesGuidesEcosystemAdditional resourcesAPI refere... | https://python.langchain.com/docs/get_started |
fd0fa414031d-86 | We have chosen this as the example for getting started because it nicely combines a lot of different elements (Text splitters, embeddings, vectorstores) and then also shows how to use them in a chain.Question answering over documents consists of four steps:Create an indexCreate a Retriever from that indexCreate a quest... | https://python.langchain.com/docs/get_started |
fd0fa414031d-87 | said that she is a consensus builder and has received a broad range of support from the Fraternal Order of Police to former judges appointed by Democrats and Republicans."query = "What did the president say about Ketanji Brown Jackson"index.query_with_sources(query) {'question': 'What did the president say about Ket... | https://python.langchain.com/docs/get_started |
fd0fa414031d-88 | split the documents into chunks.from langchain.text_splitter import CharacterTextSplittertext_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)texts = text_splitter.split_documents(documents)We will then select which embeddings we want to use.from langchain.embeddings import OpenAIEmbeddingsembeddings ... | https://python.langchain.com/docs/get_started |
fd0fa414031d-89 | chunk_overlap=0))Hopefully this highlights what is going on under the hood of VectorstoreIndexCreator. While we think it's important to have a simple way to create indexes, we also think it's important to understand what's going on under the hood.Edit this pagePreviousZillizNextMultiQueryRetrieverGet startedCommunityDi... | https://python.langchain.com/docs/get_started |
fd0fa414031d-90 | Data connection | 🦜️🔗 Langchain
Skip to main content🦜️🔗 LangChainJS/TS DocsGitHubCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/OData connectionDocument loadersDocument transformersText embedding modelsVector storesRetrieversChainsMemoryAgentsCallbacksModulesUse casesGuidesEcosystemAdditiona... | https://python.langchain.com/docs/get_started |
fd0fa414031d-91 | Jump to ContentLearnForumSupportSystem StatusContactGuidesAPI ReferenceExamplesLibrariesLearnForumSupportSystem StatusContactLog InSign Up FreeLog InSign Up FreeGuidesAPI ReferenceExamplesLibrariesAIJUMP TOPinecone APIVector OperationsDescribeIndexStatspostQuerypostDeletepostFetchgetUpdatepostUpsertpostPinecone APIInde... | https://python.langchain.com/docs/get_started |
fd0fa414031d-92 | Jump to ContentGuidesAPI ReferenceExamplesLibrariesLearnForumSupportSystem StatusContactLog InSign Up FreeLog InGuidesAPI ReferenceExamplesLibrariesAI
Pinecone Documentation
Get started using Pinecone, explore our examples, learn Pinecone concepts and components, and check our
reference documentation.... | https://python.langchain.com/docs/get_started |
fd0fa414031d-93 | DescribeIndexStats
Jump to ContentLearnForumSupportSystem StatusContactGuidesAPI ReferenceExamplesLibrariesLearnForumSupportSystem StatusContactLog InSign Up FreeLog... | https://python.langchain.com/docs/get_started |
fd0fa414031d-94 | Documentation
Learning Center
Developer Forum
Support Center
Status Page
Careers
© Pinecone Systems, Inc. | San Francisco, CA | Terms | Privacy | Product Privacy | Cookies | Trust & Security | System Status
Pinecone is a registered trademark of Pinecone Systems, Inc.
... | https://python.langchain.com/docs/get_started |
fd0fa414031d-95 | Indexes
Learn how to use indexes in Pinecone.
Understanding Indexes
Manage Indexes
Scale Indexes
Back Up Indexes
Records
Learn about working with data in your Pinecone indexes.
Insert Data
Manage Data
Query Data
Metadata Filtering
Organizations
Understand how to administer your Pinecone organization.
Understan... | https://python.langchain.com/docs/get_started |
No dataset card yet
- Downloads last month
- 10