id
stringlengths
14
15
text
stringlengths
17
2.72k
source
stringlengths
47
115
97c913f10bbc-0
TensorflowHub Let's load the TensorflowHub Embedding class. from langchain.embeddings import TensorflowHubEmbeddings embeddings = TensorflowHubEmbeddings() 2023-01-30 23:53:01.652176: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN...
https://python.langchain.com/docs/integrations/text_embedding/tensorflowhub
e4d74cabbed9-0
Xorbits inference (Xinference) This notebook goes over how to use Xinference embeddings within LangChain Installation​ Install Xinference through PyPI: %pip install "xinference[all]" Deploy Xinference Locally or in a Distributed Cluster.​ For local deployment, run xinference. To deploy Xinference in a cluster, first s...
https://python.langchain.com/docs/integrations/text_embedding/xinference
d399c2021317-0
AwaEmbedding This notebook explains how to use AwaEmbedding, which is included in awadb, to embedding texts in langchain. import the library​ from langchain.embeddings import AwaEmbeddings Embedding = AwaEmbeddings() Set embedding model Users can use Embedding.set_model() to specify the embedding model. \ The input of ...
https://python.langchain.com/docs/integrations/text_embedding/Awa
a3e9192e92b0-0
Aleph Alpha There are two possible ways to use Aleph Alpha's semantic embeddings. If you have texts with a dissimilar structure (e.g. a Document and a Query) you would want to use asymmetric embeddings. Conversely, for texts with comparable structures, symmetric embeddings are the suggested approach. Asymmetric​ from l...
https://python.langchain.com/docs/integrations/text_embedding/aleph_alpha
f379ef3004ac-0
Bedrock Embeddings from langchain.embeddings import BedrockEmbeddings embeddings = BedrockEmbeddings( credentials_profile_name="bedrock-admin", region_name="us-east-1" ) embeddings.embed_query("This is a content of the document") embeddings.embed_documents(["This is a content of the document", "This is another documen...
https://python.langchain.com/docs/integrations/text_embedding/bedrock
d4b67d96b402-0
AzureOpenAI Let's load the OpenAI Embedding class with environment variables set to indicate to use Azure endpoints. # set the environment variables needed for openai package to know to reach out to azure import os os.environ["OPENAI_API_TYPE"] = "azure" os.environ["OPENAI_API_BASE"] = "https://<your-endpoint.openai.a...
https://python.langchain.com/docs/integrations/text_embedding/azureopenai
61143f54a7d7-0
from langchain.embeddings import HuggingFaceBgeEmbeddings model_name = "BAAI/bge-small-en" model_kwargs = {'device': 'cpu'} encode_kwargs = {'normalize_embeddings': False} hf = HuggingFaceBgeEmbeddings( model_name=model_name, model_kwargs=model_kwargs, encode_kwargs=encode_kwargs )
https://python.langchain.com/docs/integrations/text_embedding/bge_huggingface
2c33ec40f742-0
Clarifai Clarifai is an AI Platform that provides the full AI lifecycle ranging from data exploration, data labeling, model training, evaluation, and inference. This example goes over how to use LangChain to interact with Clarifai models. Text embedding models in particular can be found here. To use Clarifai, you must ...
https://python.langchain.com/docs/integrations/text_embedding/clarifai
33c369a17b6d-0
Cohere Let's load the Cohere Embedding class. from langchain.embeddings import CohereEmbeddings embeddings = CohereEmbeddings(cohere_api_key=cohere_api_key) text = "This is a test document." query_result = embeddings.embed_query(text) doc_result = embeddings.embed_documents([text])
https://python.langchain.com/docs/integrations/text_embedding/cohere
a2da79fa1cf7-0
DashScope Let's load the DashScope Embedding class. from langchain.embeddings import DashScopeEmbeddings embeddings = DashScopeEmbeddings( model="text-embedding-v1", dashscope_api_key="your-dashscope-api-key" ) text = "This is a test document." query_result = embeddings.embed_query(text) print(query_result) doc_results...
https://python.langchain.com/docs/integrations/text_embedding/dashscope
fdbd0b85c70d-0
DeepInfra DeepInfra is a serverless inference as a service that provides access to a variety of LLMs and embeddings models. This notebook goes over how to use LangChain with DeepInfra for text embeddings. # sign up for an account: https://deepinfra.com/login?utm_source=langchain from getpass import getpass DEEPINFRA_...
https://python.langchain.com/docs/integrations/text_embedding/deepinfra
47b1fddd80a3-0
EDEN AI Eden AI is revolutionizing the AI landscape by uniting the best AI providers, empowering users to unlock limitless possibilities and tap into the true potential of artificial intelligence. With an all-in-one comprehensive and hassle-free platform, it allows users to deploy AI features to production lightning fa...
https://python.langchain.com/docs/integrations/text_embedding/edenai
d5b776f340de-0
Embaas embaas is a fully managed NLP API service that offers features like embedding generation, document text extraction, document to embeddings and more. You can choose a variety of pre-trained models. In this tutorial, we will show you how to use the embaas Embeddings API to generate embeddings for a given text. Pre...
https://python.langchain.com/docs/integrations/text_embedding/embaas
26dec45f2dda-0
Elasticsearch Walkthrough of how to generate embeddings using a hosted embedding model in Elasticsearch The easiest way to instantiate the ElasticsearchEmbeddings class it either using the from_credentials constructor if you are using Elastic Cloud or using the from_es_connection constructor with any Elasticsearch clus...
https://python.langchain.com/docs/integrations/text_embedding/elasticsearch
35bc92d602bf-0
ERNIE Embedding-V1 ERNIE Embedding-V1 is a text representation model based on Baidu Wenxin's large-scale model technology, which converts text into a vector form represented by numerical values, and is used in text retrieval, information recommendation, knowledge mining and other scenarios. from langchain.embeddings im...
https://python.langchain.com/docs/integrations/text_embedding/ernie
9bf74edd1d5d-0
Fake Embeddings LangChain also provides a fake embedding class. You can use this to test your pipelines. from langchain.embeddings import FakeEmbeddings embeddings = FakeEmbeddings(size=1352) query_result = embeddings.embed_query("foo") doc_results = embeddings.embed_documents(["foo"])
https://python.langchain.com/docs/integrations/text_embedding/fake
ab6be4cf654a-0
Note: This is seperate from the Google PaLM integration, it exposes Vertex AI PaLM API on Google Cloud. By default, Google Cloud does not use Customer Data to train its foundation models as part of Google Cloud`s AI/ML Privacy Commitment. More details about how Google processes data can also be found in Google's Custo...
https://python.langchain.com/docs/integrations/text_embedding/google_vertex_ai_palm
7945cb0c6b2e-0
InstructEmbeddings Let's load the HuggingFace instruct Embeddings class. from langchain.embeddings import HuggingFaceInstructEmbeddings embeddings = HuggingFaceInstructEmbeddings( query_instruction="Represent the query for retrieval: " ) load INSTRUCTOR_Transformer max_seq_length 512 text = "This is a test document." q...
https://python.langchain.com/docs/integrations/text_embedding/instruct_embeddings
0fa28d126457-0
GPT4All GPT4All is a free-to-use, locally running, privacy-aware chatbot. There is no GPU or internet required. It features popular models and its own models such as GPT4All Falcon, Wizard, etc. This notebook explains how to use GPT4All embeddings with LangChain. Install GPT4All's Python Bindings​ %pip install gpt4all ...
https://python.langchain.com/docs/integrations/text_embedding/gpt4all
e485fcaa6cc5-0
Jina Let's load the Jina Embedding class. from langchain.embeddings import JinaEmbeddings embeddings = JinaEmbeddings( jina_auth_token=jina_auth_token, model_name="ViT-B-32::openai" ) text = "This is a test document." query_result = embeddings.embed_query(text) doc_result = embeddings.embed_documents([text]) In the abo...
https://python.langchain.com/docs/integrations/text_embedding/jina
40caf537653d-0
Hugging Face Hub Let's load the Hugging Face Embedding class. from langchain.embeddings import HuggingFaceEmbeddings embeddings = HuggingFaceEmbeddings() text = "This is a test document." query_result = embeddings.embed_query(text) doc_result = embeddings.embed_documents([text])
https://python.langchain.com/docs/integrations/text_embedding/huggingfacehub
34581c6824fa-0
LocalAI Let's load the LocalAI Embedding class. In order to use the LocalAI Embedding class, you need to have the LocalAI service hosted somewhere and configure the embedding models. See the documentation at https://localai.io/basics/getting_started/index.html and https://localai.io/features/embeddings/index.html. from...
https://python.langchain.com/docs/integrations/text_embedding/localai
14bdc6044c39-0
Llama-cpp This notebook goes over how to use Llama-cpp embeddings within LangChain pip install llama-cpp-python from langchain.embeddings import LlamaCppEmbeddings llama = LlamaCppEmbeddings(model_path="/path/to/model/ggml-model-q4_0.bin") text = "This is a test document." query_result = llama.embed_query(text) doc_res...
https://python.langchain.com/docs/integrations/text_embedding/llamacpp
132683c6bc42-0
MiniMax MiniMax offers an embeddings service. This example goes over how to use LangChain to interact with MiniMax Inference for text embedding. import os os.environ["MINIMAX_GROUP_ID"] = "MINIMAX_GROUP_ID" os.environ["MINIMAX_API_KEY"] = "MINIMAX_API_KEY" from langchain.embeddings import MiniMaxEmbeddings embeddings ...
https://python.langchain.com/docs/integrations/text_embedding/minimax
3d1f5fe53311-0
ModelScope Let's load the ModelScope Embedding class. from langchain.embeddings import ModelScopeEmbeddings model_id = "damo/nlp_corom_sentence-embedding_english-base" embeddings = ModelScopeEmbeddings(model_id=model_id) text = "This is a test document." query_result = embeddings.embed_query(text) doc_results = embeddi...
https://python.langchain.com/docs/integrations/text_embedding/modelscope_hub
442f69c00c01-0
NLP Cloud NLP Cloud is an artificial intelligence platform that allows you to use the most advanced AI engines, and even train your own engines with your own data. The embeddings endpoint offers the following model: paraphrase-multilingual-mpnet-base-v2: Paraphrase Multilingual MPNet Base V2 is a very fast model based...
https://python.langchain.com/docs/integrations/text_embedding/nlp_cloud
8e5bb27abad5-0
MosaicML embeddings MosaicML offers a managed inference service. You can either use a variety of open source models, or deploy your own. This example goes over how to use LangChain to interact with MosaicML Inference for text embedding. # sign up for an account: https://forms.mosaicml.com/demo?utm_source=langchain fro...
https://python.langchain.com/docs/integrations/text_embedding/mosaicml
a55d79c07c16-0
AINetwork AI Network is a layer 1 blockchain designed to accommodate large-scale AI models, utilizing a decentralized GPU network powered by the $AIN token, enriching AI-driven NFTs (AINFTs). The AINetwork Toolkit is a set of tools for interacting with the AINetwork Blockchain. These tools allow you to transfer AIN, re...
https://python.langchain.com/docs/integrations/toolkits/ainetwork
a55d79c07c16-1
llm = ChatOpenAI(temperature=0) agent = initialize_agent( tools=tools, llm=llm, verbose=True, agent=AgentType.OPENAI_FUNCTIONS, ) Example Usage​ Here are some examples of how you can use the agent with the AINetwork Toolkit: Define App name to test​ appName = f"langchain_demo_{address.lower()}" Create an app in the AIN...
https://python.langchain.com/docs/integrations/toolkits/ainetwork
a55d79c07c16-2
{"tx_hash": "0x018846d6a9fc111edb1a2246ae2484ef05573bd2c584f3d0da155fa4b4936a9e", "result": {"gas_amount_total": {"bandwidth": {"service": 4002, "app": {"langchain_demo_0x5beb4defa2ccc274498416fd7cb34235dbc122ac": 2}}, "state": {"service": 1640}}, "gas_cost_total": 0, "func_results": {"_createApp": {"op_results": {"0":...
https://python.langchain.com/docs/integrations/toolkits/ainetwork
a55d79c07c16-3
> Entering new AgentExecutor chain... Invoking: `AINvalueOps` with `{'type': 'SET', 'path': '/apps/langchain_demo_0x5beb4defa2ccc274498416fd7cb34235dbc122ac/object', 'value': {'1': 2, '34': 56}}` {"tx_hash": "0x3d1a16d9808830088cdf4d37f90f4b1fa1242e2d5f6f983829064f45107b5279", "result": {"gas_amount_total": {"bandwi...
https://python.langchain.com/docs/integrations/toolkits/ainetwork
a55d79c07c16-4
{"tx_hash": "0x37d5264e580f6a217a347059a735bfa9eb5aad85ff28a95531c6dc09252664d2", "result": {"gas_amount_total": {"bandwidth": {"service": 0, "app": {"langchain_demo_0x5beb4defa2ccc274498416fd7cb34235dbc122ac": 1}}, "state": {"service": 0, "app": {"langchain_demo_0x5beb4defa2ccc274498416fd7cb34235dbc122ac": 712}}}, "ga...
https://python.langchain.com/docs/integrations/toolkits/ainetwork
a55d79c07c16-5
- Address: 0x5BEB4Defa2ccc274498416Fd7Cb34235DbC122Ac - branch_owner: true - write_function: true - write_owner: true - write_rule: true > Finished chain. The permissions for the path /apps/langchain_demo_0x5beb4defa2ccc274498416fd7cb34235dbc122ac are as follows: - Address: 0x5BEB4Defa2ccc274498416Fd7Cb34235DbC122Ac ...
https://python.langchain.com/docs/integrations/toolkits/ainetwork
a55d79c07c16-6
{"tx_hash": "0xa59d15d23373bcc00e413ac8ba18cb016bb3bdd54058d62606aec688c6ad3d2e", "result": {"gas_amount_total": {"bandwidth": {"service": 3}, "state": {"service": 866}}, "gas_cost_total": 0, "func_results": {"_transfer": {"op_results": {"0": {"path": "/accounts/0x5BEB4Defa2ccc274498416Fd7Cb34235DbC122Ac/balance", "res...
https://python.langchain.com/docs/integrations/toolkits/ainetwork
fc95ebf50f79-0
This notebook shows how to do question answering over structured data, in this case using the AirbyteStripeLoader. Vectorstores often have a hard time answering questions that requires computing, grouping and filtering structured data so the high level idea is to use a pandas dataframe to help with these types of quest...
https://python.langchain.com/docs/integrations/toolkits/airbyte_structured_qa
fc584ce05db7-0
Amadeus This notebook walks you through connecting LangChain to the Amadeus travel information API To use this toolkit, you will need to set up your credentials explained in the Amadeus for developers getting started overview. Once you've received a AMADEUS_CLIENT_ID and AMADEUS_CLIENT_SECRET, you can input them as env...
https://python.langchain.com/docs/integrations/toolkits/amadeus
fc584ce05db7-1
toolkit = AmadeusToolkit() tools = toolkit.get_tools() from langchain import OpenAI from langchain.agents import initialize_agent, AgentType llm = OpenAI(temperature=0) agent = initialize_agent( tools=tools, llm=llm, verbose=False, agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION, ) agent.run("What is the na...
https://python.langchain.com/docs/integrations/toolkits/amadeus
fc584ce05db7-2
) 'Dear Paul,\n\nI am writing to request that you book the earliest flight from DFW to DCA on Aug 28, 2023. The flight details are as follows:\n\nFlight 1: DFW to ATL, departing at 7:15 AM, arriving at 10:25 AM, flight number 983, carrier Delta Air Lines\nFlight 2: ATL to DCA, departing at 12:15 PM, arriving at 2:02 PM...
https://python.langchain.com/docs/integrations/toolkits/amadeus
b240f1d180e8-0
CSV This notebook shows how to use agents to interact with data in CSV format. It is mostly optimized for question answering. NOTE: this agent calls the Pandas DataFrame agent under the hood, which in turn calls the Python agent, which executes LLM generated Python code - this can be bad if the LLM generated Python cod...
https://python.langchain.com/docs/integrations/toolkits/csv
b240f1d180e8-1
Invoking: `python_repl_ast` with `import pandas as pd import math # Create a dataframe data = {'Age': [22, 38, 26, 35, 35]} df = pd.DataFrame(data) # Calculate the average age average_age = df['Age'].mean() # Calculate the square root of the average age square_root = math.sqrt(average_age) square_root` 5.58569601...
https://python.langchain.com/docs/integrations/toolkits/csv
e3535b3439b4-0
This toolkit is used to interact with the Azure Cognitive Services API to achieve some multimodal capabilities. First, you need to set up an Azure account and create a Cognitive Services resource. You can follow the instructions here to create a resource. Then, you need to get the endpoint, key and region of your reso...
https://python.langchain.com/docs/integrations/toolkits/azure_cognitive_services
ca78a937604d-0
This notebook shows how to use an agent to compare two documents. The high level idea is we will create a question-answering chain for each document, and then use that This type of agent allows calling multiple functions at once. This is really useful when some steps can be computed in parallel - like when asked to co...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-1
"{'question': "What was Alphabet's revenue?"}" [chain/start] [1:chain:AgentExecutor > 3:tool:alphabet-earnings > 4:chain:RetrievalQA] Entering Chain run with input: { "query": "What was Alphabet's revenue?" } [chain/start] [1:chain:AgentExecutor > 3:tool:alphabet-earnings > 4:chain:RetrievalQA > 5:chain:StuffDocumentsC...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-2
"context": "Alphabet Inc.\nCONSOLIDATED STATEMENTS OF INCOME\n(In millions, except per share amounts, unaudited)\nQuarter Ended March 31,\n2022 2023\nRevenues $ 68,011 $ 69,787 \nCosts and expenses:\nCost of revenues 29,599 30,612 \nResearch and development 9,119 11,468 \nSales and marketing 5,825 6,533 \nGeneral and a...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-3
billion, up 3% year over year, or up 6% in constant currency. We remain committed \nto delivering long-term growth and creating capacity to invest in our most compelling growth areas by re-engineering \nour cost base.”\nQ1 2023 financial highlights (unaudited)\nOur first quarter 2023 results reflect:\ni.$2.6 billion in...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-4
number of employees\nQuarter Ended March 31,\n2022 2023\nGoogle Search & other $ 39,618 $ 40,359 \nYouTube ads 6,869 6,693 \nGoogle Network 8,174 7,496 \nGoogle advertising 54,661 54,548 \nGoogle other 6,811 7,413 \nGoogle Services total 61,472 61,961 \nGoogle Cloud 5,821 7,454 \nOther Bets 440 288 \nHedging gains (los...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-5
191 \nOther Bets (835) (1,225) \nCorporate costs, unallocated(1) (338) (3,288) \nTotal income from operations $ 20,094 $ 17,415 \n(1)Hedging gains (losses) related to revenue included in unallocated corporate costs were $278 million and $84 million for the \nthree months ended March 31, 2022 and 2023 , respectively. Fo...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-6
Revenues \nfrom Other Bets are generated primarily from the sale of health technology and internet services.\nAfter the segment reporting changes discussed above, unallocated corporate costs primarily include AI-focused \nshared R&D activities; corporate initiatives such as our philanthropic activities; and corporate s...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-7
} [llm/start] [1:chain:AgentExecutor > 3:tool:alphabet-earnings > 4:chain:RetrievalQA > 5:chain:StuffDocumentsChain > 6:chain:LLMChain > 7:llm:ChatOpenAI] Entering LLM run with input: { "prompts": [
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-8
"System: Use the following pieces of context to answer the users question. \nIf you don't know the answer, just say that you don't know, don't try to make up an answer.\n----------------\nAlphabet Inc.\nCONSOLIDATED STATEMENTS OF INCOME\n(In millions, except per share amounts, unaudited)\nQuarter Ended March 31,\n2022 ...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-9
our long track record of innovation.”\nRuth Porat, CFO of Alphabet and Google, said: “Resilience in Search and momentum in Cloud resulted in Q1 \nconsolidated revenues of $69.8 billion, up 3% year over year, or up 6% in constant currency. We remain committed \nto delivering long-term growth and creating capacity to inv...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-10
currency revenues” for \nmore details.\n\nQ1 2023 supplemental information (in millions, except for number of employees; unaudited)\nRevenues, T raffic Acquisition Costs (TAC), and number of employees\nQuarter Ended March 31,\n2022 2023\nGoogle Search & other $ 39,618 $ 40,359 \nYouTube ads 6,869 6,693 \nGoogle Network...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-11
in the second quarter of \n2023.\nQuarter Ended March 31,\n2022 2023\n(recast)\nOperating income (loss):\nGoogle Services $ 21,973 $ 21,737 \nGoogle Cloud (706) 191 \nOther Bets (835) (1,225) \nCorporate costs, unallocated(1) (338) (3,288) \nTotal income from operations $ 20,094 $ 17,415 \n(1)Hedging gains (losses) rel...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-12
and other services for \nenterprise customers. Google Cloud generates revenues from fees received for Google Cloud Platform \nservices, Google Workspace communication and collaboration tools, and other enterprise services.\n•Other Bets is a combination of multiple operating segments that are not individually material. ...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-13
] } [llm/end] [1:chain:AgentExecutor > 3:tool:alphabet-earnings > 4:chain:RetrievalQA > 5:chain:StuffDocumentsChain > 6:chain:LLMChain > 7:llm:ChatOpenAI] [1.61s] Exiting LLM run with output: { "generations": [ [ { "text": "Alphabet's revenue for the quarter ended March 31, 2023, was $69,787 million.", "generation_info...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-14
{ "result": "Alphabet's revenue for the quarter ended March 31, 2023, was $69,787 million." } [tool/end] [1:chain:AgentExecutor > 3:tool:alphabet-earnings] [1.86s] Exiting Tool run with output: "{'query': "What was Alphabet's revenue?", 'result': "Alphabet's revenue for the quarter ended March 31, 2023, was $69,787 mil...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-15
"context": "S U M M A R Y H I G H L I G H T S \n(1) Excludes SBC (stock -based compensation).\n(2) Free cash flow = operating cash flow less capex.\n(3) Includes cash, cash equivalents and investments.Profitability 11.4% operating margin in Q1\n$2.7B GAAP operating income in Q1\n$2.5B GAAP net income in Q1\n$2.9B non -...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-16
in our cash and investments3in Q1 to $22.4B\nOperations Cybertruck factory tooling on track; producing Alpha versions\nModel Y was the best -selling vehicle in Europe in Q1\nModel Y was the best -selling vehicle in the US in Q1 (ex -pickups)\n\n01234O T H E R H I G H L I G H T S\n9Services & Other gross margin\nEnergy ...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-17
564 \nTotal automotive revenues 16,861 14,602 18,692 21,307 19,963 \nEnergy generation and storage 616 866 1,117 1,310 1,529 \nServices and other 1,279 1,466 1,645 1,701 1,837 \nTotal revenues 18,756 16,934 21,454 24,318 23,329 \nCOST OF REVENUES\nAutomotive sales 10,914 10,153 13,099 15,433 15,422 \nAutomotive leasing...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-18
INCOME 3,280 2,269 3,331 3,707 2,539 \nNet (loss) income attributable to noncontrolling interests and redeemable noncontrolling interests in \nsubsidiaries(38) 10 39 20 26 \nNET INCOME ATTRIBUTABLE TO COMMON STOCKHOLDERS 3,318 2,259 3,292 3,687 2,513 \nNet income per share of common stock attributable to common stockho...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-19
405,278 422,875 36%\nof which subject to operating lease accounting 12,167 9,227 11,004 15,184 22,357 84%\nTotal end of quarter operating lease vehicle count 128,402 131,756 135,054 140,667 153,988 20%\nGlobal vehicle inventory (days of supply )(1)3 4 8 13 15 400%\nSolar deployed (MW) 48 106 94 100 67 40%\nStorage depl...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-20
} [llm/start] [1:chain:AgentExecutor > 8:tool:tesla-earnings > 9:chain:RetrievalQA > 10:chain:StuffDocumentsChain > 11:chain:LLMChain > 12:llm:ChatOpenAI] Entering LLM run with input: { "prompts": [
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-21
"System: Use the following pieces of context to answer the users question. \nIf you don't know the answer, just say that you don't know, don't try to make up an answer.\n----------------\nS U M M A R Y H I G H L I G H T S \n(1) Excludes SBC (stock -based compensation).\n(2) Free cash flow = operating cash flow less cap...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-22
to ensure we lay a proper foundation for the best \npossible future.Cash Operating cash flow of $2.5B\nFree cash flow2of $0.4B in Q1\n$0.2B increase in our cash and investments3in Q1 to $22.4B\nOperations Cybertruck factory tooling on track; producing Alpha versions\nModel Y was the best -selling vehicle in Europe in Q...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-23
15,514 13,670 17,785 20,241 18,878 \nAutomotive regulatory credits 679 344 286 467 521 \nAutomotive leasing 668 588 621 599 564 \nTotal automotive revenues 16,861 14,602 18,692 21,307 19,963 \nEnergy generation and storage 616 866 1,117 1,310 1,529 \nServices and other 1,279 1,466 1,645 1,701 1,837 \nTotal revenues 18,...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-24
(48)\nINCOME BEFORE INCOME TAXES 3,626 2,474 3,636 3,983 2,800 \nProvision for income taxes 346 205 305 276 261 \nNET INCOME 3,280 2,269 3,331 3,707 2,539 \nNet (loss) income attributable to noncontrolling interests and redeemable noncontrolling interests in \nsubsidiaries(38) 10 39 20 26 \nNET INCOME ATTRIBUTABLE TO C...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-25
10,695 -27%\nModel 3/Y deliveries 295,324 238,533 325,158 388,131 412,180 40%\nTotal deliveries 310,048 254,695 343,830 405,278 422,875 36%\nof which subject to operating lease accounting 12,167 9,227 11,004 15,184 22,357 84%\nTotal end of quarter operating lease vehicle count 128,402 131,756 135,054 140,667 153,988 20...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-26
] } [llm/end] [1:chain:AgentExecutor > 8:tool:tesla-earnings > 9:chain:RetrievalQA > 10:chain:StuffDocumentsChain > 11:chain:LLMChain > 12:llm:ChatOpenAI] [1.17s] Exiting LLM run with output: { "generations": [ [ { "text": "Tesla's revenue for Q1-2023 was $23.329 billion.", "generation_info": null, "message": { "conten...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-27
} [tool/end] [1:chain:AgentExecutor > 8:tool:tesla-earnings] [1.61s] Exiting Tool run with output: "{'query': "What was Tesla's revenue?", 'result': "Tesla's revenue for Q1-2023 was $23.329 billion."}" [llm/start] [1:chain:AgentExecutor > 13:llm:ChatOpenAI] Entering LLM run with input: { "prompts": [ "System: You are a...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-28
{ "generations": [ [ { "text": "Alphabet had a revenue of $69,787 million, while Tesla had a revenue of $23.329 billion. Therefore, Alphabet had more revenue than Tesla.", "generation_info": null, "message": { "content": "Alphabet had a revenue of $69,787 million, while Tesla had a revenue of $23.329 billion. Therefore...
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
ca78a937604d-29
{'input': 'did alphabet or tesla have more revenue?', 'output': 'Alphabet had a revenue of $69,787 million, while Tesla had a revenue of $23.329 billion. Therefore, Alphabet had more revenue than Tesla.'}
https://python.langchain.com/docs/integrations/toolkits/document_comparison_toolkit
4bdf9c375d0e-0
Github The Github toolkit contains tools that enable an LLM agent to interact with a github repository. The tool is a wrapper for the PyGitHub library. Quickstart​ Install the pygithub library Create a Github app Set your environmental variables Pass the tools to your agent with toolkit.get_tools() Each of these steps...
https://python.langchain.com/docs/integrations/toolkits/github
4bdf9c375d0e-1
from langchain.llms import OpenAI from langchain.utilities.github import GitHubAPIWrapper # Set your environment variables using os.environ os.environ["GITHUB_APP_ID"] = "123456" os.environ["GITHUB_APP_PRIVATE_KEY"] = "path/to/your/private-key.pem" os.environ["GITHUB_REPOSITORY"] = "username/repo-name" os.environ["GITH...
https://python.langchain.com/docs/integrations/toolkits/github
4bdf9c375d0e-2
# This example also requires an OpenAI API key os.environ["OPENAI_API_KEY"] = "" llm = OpenAI(temperature=0) github = GitHubAPIWrapper() toolkit = GitHubToolkit.from_github_api_wrapper(github) agent = initialize_agent( toolkit.get_tools(), llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True ) agent.run( "You...
https://python.langchain.com/docs/integrations/toolkits/github
4bdf9c375d0e-3
> Finished chain. 'The README.md file has been updated with the new content.' Example: Advanced Agent​ If your agent does not need to use all 8 tools, you can build tools individually to use. For this example, we'll make an agent that does not use the create_file, delete_file or create_pull_request tools, but can ...
https://python.langchain.com/docs/integrations/toolkits/github
4bdf9c375d0e-4
Action: Search Action Input: "most popular frontend framework" Observation: Alex Ivanovs February 25, 2023 Table of Contents What are the current Front-end trends? Top Front-end Frameworks for 2023 #1 - React #2 - Angular #3 - Vue #4 - Svelte #5 - Preact #6 - Ember #7 - Solid #8 - Lit #9 - Alpine #10 - Stencil #11 - Qw...
https://python.langchain.com/docs/integrations/toolkits/github
4bdf9c375d0e-5
Observation: File content was not updated because old content was not found.It may be helpful to use the read_file action to get the current file contents. Thought:I need to first read the contents of the README.md file to get the current content. Then I can update the file with the new content. Action: Read File Acti...
https://python.langchain.com/docs/integrations/toolkits/github
9b863592c3b4-0
This notebook walks through connecting a LangChain email to the Gmail API. To use this toolkit, you will need to set up your credentials explained in the Gmail API docs. Once you've downloaded the credentials.json file, you can start using the Gmail API. Once this is done, we'll install the required libraries. By defau...
https://python.langchain.com/docs/integrations/toolkits/gmail
9b863592c3b4-1
# Can review scopes here https://developers.google.com/gmail/api/auth/scopes # For instance, readonly scope is 'https://www.googleapis.com/auth/gmail.readonly' credentials = get_gmail_credentials( token_file="token.json", scopes=["https://mail.google.com/"], client_secrets_file="credentials.json", ) api_resource = buil...
https://python.langchain.com/docs/integrations/toolkits/gmail
9b863592c3b4-2
GmailGetThread(name='get_gmail_thread', description=('Use this tool to search for email messages. The input must be a valid Gmail query. The output is a JSON list of messages.',), args_schema=<class 'langchain.tools.gmail.get_thread.GetThreadSchema'>, return_direct=False, verbose=False, callbacks=None, callback_manager...
https://python.langchain.com/docs/integrations/toolkits/gmail
3b29ccec690d-0
Google Drive tool This notebook walks through connecting a LangChain to the Google Drive API. Prerequisites​ Create a Google Cloud project or use an existing project Enable the Google Drive API Authorize credentials for desktop app pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib...
https://python.langchain.com/docs/integrations/toolkits/google_drive
3b29ccec690d-1
application/vnd.google-apps.spreadsheet (GSheet) application/vnd.google.colaboratory (Notebook colab) application/vnd.openxmlformats-officedocument.presentationml.presentation (PPTX) application/vnd.openxmlformats-officedocument.wordprocessingml.document (DOCX) It's possible to update or customize this. See the documen...
https://python.langchain.com/docs/integrations/toolkits/google_drive
3b29ccec690d-2
# By default, search only in the filename. tool = GoogleDriveSearchTool( api_wrapper=GoogleDriveAPIWrapper( folder_id=folder_id, num_results=2, template="gdrive-query-in-folder", # Search in the body of documents ) ) import logging logging.basicConfig(level=logging.INFO) tool.run("machine learning") from langchain.agen...
https://python.langchain.com/docs/integrations/toolkits/google_drive
21e1e9a99892-0
Jira This notebook goes over how to use the Jira toolkit. The Jira toolkit allows agents to interact with a given Jira instance, performing actions such as searching for issues and creating issues, the tool wraps the atlassian-python-api library, for more see: https://atlassian-python-api.readthedocs.io/jira.html To us...
https://python.langchain.com/docs/integrations/toolkits/jira
65ef8c23475c-0
This notebook showcases an agent interacting with large JSON/dict objects. This is useful when you want to answer questions about a JSON blob that's too large to fit in the context window of an LLM. The agent is able to iteratively explore the blob to find what it needs to answer the user's question. In the below examp...
https://python.langchain.com/docs/integrations/toolkits/json
65ef8c23475c-1
> Entering new AgentExecutor chain... Action: json_spec_list_keys Action Input: data Observation: ['openapi', 'info', 'servers', 'tags', 'paths', 'components', 'x-oaiMeta'] Thought: I should look at the paths key to see what endpoints exist Action: json_spec_list_keys Action Input: data["paths"] Observation: ['/engines...
https://python.langchain.com/docs/integrations/toolkits/json
65ef8c23475c-2
Action: json_spec_list_keys Action Input: data["paths"]["/completions"]["post"]["requestBody"]["content"]["application/json"] Observation: ['schema'] Thought: I should look at the schema key to see what parameters are required Action: json_spec_list_keys Action Input: data["paths"]["/completions"]["post"]["requestBody"...
https://python.langchain.com/docs/integrations/toolkits/json
65ef8c23475c-3
> Finished chain. "The required parameters in the request body to the /completions endpoint are 'model'."
https://python.langchain.com/docs/integrations/toolkits/json
0e2fd142f99c-0
MultiOn This notebook walks you through connecting LangChain to the MultiOn Client in your browser To use this toolkit, you will need to add MultiOn Extension to your browser as explained in the MultiOn for Chrome. pip install --upgrade multion langchain -q from langchain.agents.agent_toolkits import MultionToolkit imp...
https://python.langchain.com/docs/integrations/toolkits/multion
18858094916d-0
This notebook walks through connecting LangChain to Office365 email and calendar. To use this toolkit, you will need to set up your credentials explained in the Microsoft Graph authentication and authorization overview. Once you've received a CLIENT_ID and CLIENT_SECRET, you can input them as environmental variables be...
https://python.langchain.com/docs/integrations/toolkits/office365
18858094916d-1
O365SearchEmails(name='messages_search', description='Use this tool to search for email messages. The input must be a valid Microsoft Graph v1.0 $search query. The output is a JSON list of the requested resource.', args_schema=<class 'langchain.tools.office365.messages_search.SearchEmailsInput'>, return_direct=False, v...
https://python.langchain.com/docs/integrations/toolkits/office365
f4cec29c55a4-0
Natural Language 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. For a detailed walkthrough of the OpenAPI chains wrapped within the NLAToolkit, see the OpenAPI Operati...
https://python.langchain.com/docs/integrations/toolkits/openapi_nla
f4cec29c55a4-1
> Entering new AgentExecutor chain... I need to find a recipe and an outfit that is Italian-themed. Action: spoonacular_API.searchRecipes Action Input: Italian Observation: The API response contains 10 Italian recipes, including Turkey Tomato Cheese Pizza, Broccolini Quinoa Pilaf, Bruschetta Style Pork & Pasta, Salmon ...
https://python.langchain.com/docs/integrations/toolkits/openapi_nla
f4cec29c55a4-2
> Finished chain. 'To present for your Italian language class, you could wear an Italian Gold Sparkle Perfectina Necklace - Gold, an Italian Design Miami Cuban Link Chain Necklace - Gold, or an Italian Gold Miami Cuban Link Chain Necklace - Gold. For a recipe, you could make Turkey Tomato Cheese Pizza, Broccolini ...
https://python.langchain.com/docs/integrations/toolkits/openapi_nla
4bf4e892bacb-0
We can construct agents to consume arbitrary APIs, here APIs conformant to the OpenAPI/Swagger specification. In this example, we'll consider an approach called hierarchical planning, common in robotics and appearing in recent works for LLMs X robotics. We'll see it's a viable approach to start working with a massive A...
https://python.langchain.com/docs/integrations/toolkits/openapi
4bf4e892bacb-1
> Entering new AgentExecutor chain... Action: requests_get Action Input: {"url": "https://api.spotify.com/v1/me", "output_instructions": "Extract the user's id and username"} Observation: ID: 22rhrz4m4kvpxlsb5hezokzwi, Username: Jeremy Welborn Thought:Action: requests_get Action Input: {"url": "https://api.spotify.com/...
https://python.langchain.com/docs/integrations/toolkits/openapi
4bf4e892bacb-2
Action: requests_get Action Input: {"url": "https://api.spotify.com/v1/recommendations?seed_genres=blues", "output_instructions": "Extract the list of recommended tracks with their ids and names"} Observation: [ { id: '03lXHmokj9qsXspNsPoirR', name: 'Get Away Jordan' } ] Thought:I am finished executing the plan. Final ...
https://python.langchain.com/docs/integrations/toolkits/openapi
4bf4e892bacb-3
> Entering new AgentExecutor chain... Action: requests_get Action Input: {"url": "https://api.openai.com/v1/engines", "output_instructions": "Extract the ids of the engines"} Observation: babbage, davinci, text-davinci-edit-001, babbage-code-search-code, text-similarity-babbage-001, code-davinci-edit-001, text-davinci-...
https://python.langchain.com/docs/integrations/toolkits/openapi
4bf4e892bacb-4
> Finished chain. Observation: I need more information on how to provide the model parameter correctly in the POST request to generate a short piece of advice. Thought:I need to adjust my plan to include the model parameter in the POST request. Action: api_planner Action Input: I need to find the right API calls to ge...
https://python.langchain.com/docs/integrations/toolkits/openapi
4bf4e892bacb-5
> Finished chain. Observation: The generated text is not a piece of advice on improving communication skills. I would need to retry the API call with a different prompt or model to get a more relevant response. Thought:I need to adjust my plan to include a more specific prompt for generating a short piece of advice on...
https://python.langchain.com/docs/integrations/toolkits/openapi