id
stringlengths
14
16
text
stringlengths
36
2.73k
source
stringlengths
49
117
79716c54d732-0
.md .pdf SearxNG Search API Contents Installation and Setup Self Hosted Instance: Wrappers Utility Tool SearxNG Search API# This page covers how to use the SearxNG search API within LangChain. It is broken into two parts: installation and setup, and then references to the specific SearxNG API wrapper. Installation an...
https://python.langchain.com/en/latest/integrations/searx.html
79716c54d732-1
s.run("what is a large language model?") Tool# You can also load this wrapper as a Tool (to use with an Agent). You can do this with: from langchain.agents import load_tools tools = load_tools(["searx-search"], searx_host="http://localhost:8888", engines=["github"]) Note that we ...
https://python.langchain.com/en/latest/integrations/searx.html
0b85be0781f0-0
.md .pdf Yeager.ai Contents What is Yeager.ai? yAgents How to use? Creating and Executing Tools with yAgents Yeager.ai# This page covers how to use Yeager.ai to generate LangChain tools and agents. What is Yeager.ai?# Yeager.ai is an ecosystem designed to simplify the process of creating AI agents and tools. It featu...
https://python.langchain.com/en/latest/integrations/yeagerai.html
0b85be0781f0-1
create a tool that returns the n-th prime number Load the tool into the toolkit: To load a tool into yAgents, simply provide a command to yAgents that says so. For example: load the tool that you just created it into your toolkit Execute the tool: To run a tool or agent, simply provide a command to yAgents that include...
https://python.langchain.com/en/latest/integrations/yeagerai.html
107b2d33c11a-0
.md .pdf PipelineAI Contents Installation and Setup Wrappers LLM PipelineAI# This page covers how to use the PipelineAI ecosystem within LangChain. It is broken into two parts: installation and setup, and then references to specific PipelineAI wrappers. Installation and Setup# Install with pip install pipeline-ai Get...
https://python.langchain.com/en/latest/integrations/pipelineai.html
da618c5552d1-0
.md .pdf Llama.cpp Contents Installation and Setup Wrappers LLM Embeddings Llama.cpp# This page covers how to use llama.cpp within LangChain. It is broken into two parts: installation and setup, and then references to specific Llama-cpp wrappers. Installation and Setup# Install the Python package with pip install lla...
https://python.langchain.com/en/latest/integrations/llamacpp.html
70e2499df5e7-0
.md .pdf Pinecone Contents Installation and Setup Wrappers VectorStore Pinecone# This page covers how to use the Pinecone ecosystem within LangChain. It is broken into two parts: installation and setup, and then references to specific Pinecone wrappers. Installation and Setup# Install the Python SDK with pip install ...
https://python.langchain.com/en/latest/integrations/pinecone.html
bc31d640c2f3-0
.md .pdf Runhouse Contents Installation and Setup Self-hosted LLMs Self-hosted Embeddings Runhouse# This page covers how to use the Runhouse ecosystem within LangChain. It is broken into three parts: installation and setup, LLMs, and Embeddings. Installation and Setup# Install the Python SDK with pip install runhouse...
https://python.langchain.com/en/latest/integrations/runhouse.html
cb9a4a58c64c-0
.ipynb .pdf Comet Contents Install Comet and Dependencies Initialize Comet and Set your Credentials Set OpenAI and SerpAPI credentials Scenario 1: Using just an LLM Scenario 2: Using an LLM in a Chain Scenario 3: Using An Agent with Tools Scenario 4: Using Custom Evaluation Metrics Comet# In this guide we will demons...
https://python.langchain.com/en/latest/integrations/comet_tracking.html
cb9a4a58c64c-1
llm = OpenAI(temperature=0.9, callbacks=callbacks, verbose=True) llm_result = llm.generate(["Tell me a joke", "Tell me a poem", "Tell me a fact"] * 3) print("LLM result", llm_result) comet_callback.flush_tracker(llm, finish=True) Scenario 2: Using an LLM in a Chain# from langchain.callbacks import CometCallbackHandler,...
https://python.langchain.com/en/latest/integrations/comet_tracking.html
cb9a4a58c64c-2
project_name="comet-example-langchain", complexity_metrics=True, stream_logs=True, tags=["agent"], ) callbacks = [StdOutCallbackHandler(), comet_callback] llm = OpenAI(temperature=0.9, callbacks=callbacks) tools = load_tools(["serpapi", "llm-math"], llm=llm, callbacks=callbacks) agent = initialize_agent( ...
https://python.langchain.com/en/latest/integrations/comet_tracking.html
cb9a4a58c64c-3
return { "rougeLsum_score": results["rougeLsum"].fmeasure, "reference": self.reference, } reference = """ The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building. It was the first structure to reach a height of 300 metres. It is now taller than the Chrysle...
https://python.langchain.com/en/latest/integrations/comet_tracking.html
cb9a4a58c64c-4
a title it held for 41 years until the Chrysler Building in New York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller t...
https://python.langchain.com/en/latest/integrations/comet_tracking.html
08100cbfa34c-0
.md .pdf GooseAI Contents Installation and Setup Wrappers LLM GooseAI# This page covers how to use the GooseAI ecosystem within LangChain. It is broken into two parts: installation and setup, and then references to specific GooseAI wrappers. Installation and Setup# Install the Python SDK with pip install openai Get y...
https://python.langchain.com/en/latest/integrations/gooseai.html
204e616f7c32-0
.md .pdf MyScale Contents Introduction Installation and Setup Setting up envrionments Wrappers VectorStore MyScale# This page covers how to use MyScale vector database within LangChain. It is broken into two parts: installation and setup, and then references to specific MyScale wrappers. With MyScale, you can manage ...
https://python.langchain.com/en/latest/integrations/myscale.html
204e616f7c32-1
index = MyScale(embedding_function, config) index.add_documents(...) Wrappers# supported functions: add_texts add_documents from_texts from_documents similarity_search asimilarity_search similarity_search_by_vector asimilarity_search_by_vector similarity_search_with_relevance_scores VectorStore# There exists a wrapper ...
https://python.langchain.com/en/latest/integrations/myscale.html
d41116fc63c2-0
.md .pdf Modal Contents Installation and Setup Define your Modal Functions and Webhooks Wrappers LLM Modal# This page covers how to use the Modal ecosystem within LangChain. It is broken into two parts: installation and setup, and then references to specific Modal wrappers. Installation and Setup# Install with pip in...
https://python.langchain.com/en/latest/integrations/modal.html
d41116fc63c2-1
@stub.webhook(method="POST") def get_text(item: Item): return {"prompt": run_gpt2.call(item.prompt)} Wrappers# LLM# There exists an Modal LLM wrapper, which you can access with from langchain.llms import Modal previous MLflow next Momento Contents Installation and Setup Define your Modal Functions and Webhooks ...
https://python.langchain.com/en/latest/integrations/modal.html
41f52287b5ee-0
.md .pdf Jina Contents Installation and Setup Wrappers Embeddings Jina# This page covers how to use the Jina ecosystem within LangChain. It is broken into two parts: installation and setup, and then references to specific Jina wrappers. Installation and Setup# Install the Python SDK with pip install jina Get a Jina A...
https://python.langchain.com/en/latest/integrations/jina.html
3fe2ed49bcce-0
.md .pdf C Transformers Contents Installation and Setup Wrappers LLM C Transformers# This page covers how to use the C Transformers library within LangChain. It is broken into two parts: installation and setup, and then references to specific C Transformers wrappers. Installation and Setup# Install the Python package...
https://python.langchain.com/en/latest/integrations/ctransformers.html
3fe2ed49bcce-1
previous Comet next Databerry Contents Installation and Setup Wrappers LLM By Harrison Chase © Copyright 2023, Harrison Chase. Last updated on May 28, 2023.
https://python.langchain.com/en/latest/integrations/ctransformers.html
692caf8223bc-0
.md .pdf Prediction Guard Contents Installation and Setup LLM Wrapper Example usage Prediction Guard# This page covers how to use the Prediction Guard ecosystem within LangChain. It is broken into two parts: installation and setup, and then references to specific Prediction Guard wrappers. Installation and Setup# Ins...
https://python.langchain.com/en/latest/integrations/predictionguard.html
692caf8223bc-1
llm_chain.predict(question=question) previous PipelineAI next PromptLayer Contents Installation and Setup LLM Wrapper Example usage By Harrison Chase © Copyright 2023, Harrison Chase. Last updated on May 28, 2023.
https://python.langchain.com/en/latest/integrations/predictionguard.html
bc157426d21d-0
.md .pdf OpenAI Contents Installation and Setup Wrappers LLM Embeddings Tokenizer Moderation OpenAI# This page covers how to use the OpenAI ecosystem within LangChain. It is broken into two parts: installation and setup, and then references to specific OpenAI wrappers. Installation and Setup# Install the Python SDK w...
https://python.langchain.com/en/latest/integrations/openai.html
bc157426d21d-1
Contents Installation and Setup Wrappers LLM Embeddings Tokenizer Moderation By Harrison Chase © Copyright 2023, Harrison Chase. Last updated on May 28, 2023.
https://python.langchain.com/en/latest/integrations/openai.html
017cb9d1421c-0
.ipynb .pdf ClearML Integration Contents Getting API Credentials Setting Up Scenario 1: Just an LLM Scenario 2: Creating an agent with tools Tips and Next Steps ClearML Integration# In order to properly keep track of your langchain experiments and their results, you can enable the ClearML integration. ClearML is an e...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-1
llm = OpenAI(temperature=0, callbacks=callbacks) The clearml callback is currently in beta and is subject to change based on updates to `langchain`. Please report any issues to https://github.com/allegroai/clearml/issues with the tag `langchain`. Scenario 1: Just an LLM# First, let’s just run a single LLM a few times a...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-2
{'action': 'on_llm_start', 'name': 'OpenAI', 'step': 3, 'starts': 2, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'prompts': 'Tell me a poem'} {'action': 'on_llm_start', 'name': 'OpenAI', '...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-3
{'action': 'on_llm_start', 'name': 'OpenAI', 'step': 3, 'starts': 2, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'prompts': 'Tell me a joke'} {'action': 'on_llm_start', 'name': 'OpenAI', '...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-4
{'action': 'on_llm_end', 'token_usage_prompt_tokens': 24, 'token_usage_completion_tokens': 138, 'token_usage_total_tokens': 162, 'model_name': 'text-davinci-003', 'step': 4, 'starts': 2, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_st...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-5
{'action': 'on_llm_end', 'token_usage_prompt_tokens': 24, 'token_usage_completion_tokens': 138, 'token_usage_total_tokens': 162, 'model_name': 'text-davinci-003', 'step': 4, 'starts': 2, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_st...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-6
{'action': 'on_llm_end', 'token_usage_prompt_tokens': 24, 'token_usage_completion_tokens': 138, 'token_usage_total_tokens': 162, 'model_name': 'text-davinci-003', 'step': 4, 'starts': 2, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_st...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-7
{'action': 'on_llm_end', 'token_usage_prompt_tokens': 24, 'token_usage_completion_tokens': 138, 'token_usage_total_tokens': 162, 'model_name': 'text-davinci-003', 'step': 4, 'starts': 2, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_st...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-8
{'action': 'on_llm_end', 'token_usage_prompt_tokens': 24, 'token_usage_completion_tokens': 138, 'token_usage_total_tokens': 162, 'model_name': 'text-davinci-003', 'step': 4, 'starts': 2, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_st...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-9
{'action': 'on_llm_end', 'token_usage_prompt_tokens': 24, 'token_usage_completion_tokens': 138, 'token_usage_total_tokens': 162, 'model_name': 'text-davinci-003', 'step': 4, 'starts': 2, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_st...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-10
0 on_llm_start OpenAI 1 1 0 0 0 0 1 on_llm_start OpenAI 1 1 0 0 0 0 2 on_llm_start OpenAI 1 1 0 0 0 0 3 on_llm_start OpenAI 1 1 0 0 0 0 ...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-11
14 on_llm_start OpenAI 3 2 1 0 0 0 15 on_llm_start OpenAI 3 2 1 0 0 0 16 on_llm_start OpenAI 3 2 1 0 0 0 17 on_llm_start OpenAI 3 2 1 0 0 0 ...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-12
5 0 1 ... NaN NaN 6 0 1 ... 0.0 5.5 7 0 1 ... 2.0 6.5 8 0 1 ... 0.0 5.5 9 0 ...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-13
0 NaN NaN NaN NaN 1 NaN NaN NaN NaN 2 NaN NaN NaN NaN 3 NaN NaN NaN NaN 4 NaN N...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-14
21 8.28 6th and 7th grade 115.58 112.37 22 5.20 5th and 6th grade 133.58 131.54 23 8.28 6th and 7th grade 115.58 112.37 gutierrez_polini crawford gulpease_index osman 0 NaN NaN NaN ...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-15
19 54.83 1.4 72.1 100.17 20 62.30 -0.2 79.8 116.91 21 54.83 1.4 72.1 100.17 22 62.30 -0.2 79.8 116.91 23 54.83 1.4 72.1 100.17 [24 rows x 39 columns], 'session_an...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-16
2 \n\nQ: What did the fish say when it hit the w... 3 \n\nRoses are red,\nViolets are blue,\nSugar i... 4 \n\nQ: What did the fish say when it hit the w... 5 \n\nRoses are red,\nViolets are blue,\nSugar i... 6 \n\nQ: What did the fish say when it hit the w... 7 \n\nRoses are red,\nViolets are...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-17
1 138 83.66 4.8 2 138 109.04 1.3 3 138 83.66 4.8 4 138 109.04 1.3 ...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-18
10 ... 0 5.5 5.20 11 ... 2 6.5 8.28 text_standard fernandez_huerta szigriszt_pazos gutierrez_polini \ 0 5th and 6th grade 133.58 131.54 62.30 1 6th and 7th grade 115...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-19
crawford gulpease_index osman 0 -0.2 79.8 116.91 1 1.4 72.1 100.17 2 -0.2 79.8 116.91 3 1.4 72.1 100.17 4 -0.2 79.8 116.91 5 1.4 72.1 100.17 6 -0.2 79.8 116.91 7 1.4 ...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-20
Finally, if you enabled visualizations, these are stored as HTML files under debug samples. Scenario 2: Creating an agent with tools# To show a more advanced workflow, let’s create an agent with access to tools. The way ClearML tracks the results is not different though, only the table will look slightly different as t...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-21
{'action': 'on_llm_start', 'name': 'OpenAI', 'step': 2, 'starts': 2, 'ends': 0, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 1, 'llm_ends': 0, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'prompts': 'Answer the following questions as best you can. You have access...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-22
{'action': 'on_llm_end', 'token_usage_prompt_tokens': 189, 'token_usage_completion_tokens': 34, 'token_usage_total_tokens': 223, 'model_name': 'text-davinci-003', 'step': 3, 'starts': 2, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 1, 'llm_ends': 1, 'llm_streams': 0, 'tool_st...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-23
I need to find out who sang summer of 69 and then find out who their wife is. Action: Search Action Input: "Who sang summer of 69"{'action': 'on_agent_action', 'tool': 'Search', 'tool_input': 'Who sang summer of 69', 'log': ' I need to find out who sang summer of 69 and then find out who their wife is.\nAction: Search\...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-24
Observation: Bryan Adams - Summer Of 69 (Official Music Video). Thought:{'action': 'on_tool_end', 'output': 'Bryan Adams - Summer Of 69 (Official Music Video).', 'step': 6, 'starts': 4, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 1, 'llm_ends': 1, 'llm_streams': 0, 'tool_sta...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-25
{'action': 'on_llm_start', 'name': 'OpenAI', 'step': 7, 'starts': 5, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 2, 'tool_ends': 1, 'agent_ends': 0, 'prompts': 'Answer the following questions as best you can. You have access...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-26
{'action': 'on_llm_end', 'token_usage_prompt_tokens': 242, 'token_usage_completion_tokens': 28, 'token_usage_total_tokens': 270, 'model_name': 'text-davinci-003', 'step': 8, 'starts': 5, 'ends': 3, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_st...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-27
I need to find out who Bryan Adams is married to. Action: Search Action Input: "Who is Bryan Adams married to"{'action': 'on_agent_action', 'tool': 'Search', 'tool_input': 'Who is Bryan Adams married to', 'log': ' I need to find out who Bryan Adams is married to.\nAction: Search\nAction Input: "Who is Bryan Adams marri...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-28
Thought:{'action': 'on_tool_end', 'output': 'Bryan Adams has never married. In the 1990s, he was in a relationship with Danish model Cecilie Thomsen. In 2011, Bryan and Alicia Grimaldi, his ...', 'step': 11, 'starts': 7, 'ends': 4, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 2, 'llm_en...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-29
{'action': 'on_llm_start', 'name': 'OpenAI', 'step': 12, 'starts': 8, 'ends': 4, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 3, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 4, 'tool_ends': 2, 'agent_ends': 0, 'prompts': 'Answer the following questions as best you can. You have acces...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-30
to the original input question\n\nBegin!\n\nQuestion: Who is the wife of the person who sang summer of 69?\nThought: I need to find out who sang summer of 69 and then find out who their wife is.\nAction: Search\nAction Input: "Who sang summer of 69"\nObservation: Bryan Adams - Summer Of 69 (Official Music Video).\nThou...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-31
{'action': 'on_llm_end', 'token_usage_prompt_tokens': 314, 'token_usage_completion_tokens': 18, 'token_usage_total_tokens': 332, 'model_name': 'text-davinci-003', 'step': 13, 'starts': 8, 'ends': 5, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 3, 'llm_ends': 3, 'llm_streams': 0, 'tool_s...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-32
I now know the final answer. Final Answer: Bryan Adams has never been married. {'action': 'on_agent_finish', 'output': 'Bryan Adams has never been married.', 'log': ' I now know the final answer.\nFinal Answer: Bryan Adams has never been married.', 'step': 14, 'starts': 8, 'ends': 6, 'errors': 0, 'text_ctr': 0, 'chain_...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-33
4 on_llm_start OpenAI 1 1 0 0 0 .. ... ... ... ... ... ... ... 66 on_tool_end NaN 11 7 4 0 0 67 on_llm_start OpenAI 12 8 4 0 0 68 on_llm_end NaN 13 8 ...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-34
69 1 0 3 ... NaN NaN NaN 70 1 1 3 ... NaN NaN NaN tool tool_input log \ 0 NaN NaN NaN 1 NaN ...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-35
0 2 Answer the following questions as best you can... OpenAI 1 7 Answer the following questions as best you can... OpenAI 2 12 Answer the following questions as best you can... OpenAI output_step output \ 0 3 I n...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
017cb9d1421c-36
2 3rd and 4th grade 115.70 110.84 49.79 crawford gulpease_index osman 0 0.9 72.7 92.16 1 0.7 74.7 84.20 2 0.7 85.4 83.14 [3 rows x 24 columns]} Could not update last created model in Task 988bd727b0e94a29a3ac0ee526813545...
https://python.langchain.com/en/latest/integrations/clearml_tracking.html
36df20c22fed-0
.md .pdf Metal Contents What is Metal? Quick start Metal# This page covers how to use Metal within LangChain. What is Metal?# Metal is a managed retrieval & memory platform built for production. Easily index your data into Metal and run semantic search and retrieval on it. Quick start# Get started by creating a Meta...
https://python.langchain.com/en/latest/integrations/metal.html
0026e67f954b-0
.md .pdf RWKV-4 Contents Installation and Setup Usage RWKV Model File Rwkv-4 models -> recommended VRAM RWKV-4# This page covers how to use the RWKV-4 wrapper within LangChain. It is broken into two parts: installation and setup, and then usage with an example. Installation and Setup# Install the Python package with ...
https://python.langchain.com/en/latest/integrations/rwkv.html
0026e67f954b-1
RWKV VRAM Model | 8bit | bf16/fp16 | fp32 14B | 16GB | 28GB | >50GB 7B | 8GB | 14GB | 28GB 3B | 2.8GB| 6GB | 12GB 1b5 | 1.3GB| 3GB | 6GB See the rwkv pip page for more information about strategies, including streaming and cuda support. previous Runhouse next SearxNG Search API Contents...
https://python.langchain.com/en/latest/integrations/rwkv.html
bc92954b4577-0
.md .pdf Replicate Contents Installation and Setup Calling a model Replicate# This page covers how to run models on Replicate within LangChain. Installation and Setup# Create a Replicate account. Get your API key and set it as an environment variable (REPLICATE_API_TOKEN) Install the Replicate python client with pip ...
https://python.langchain.com/en/latest/integrations/replicate.html
bc92954b4577-1
And run it: prompt = """ Answer the following yes/no question by reasoning step by step. Can a dog drive a car? """ llm(prompt) We can call any Replicate model (not just LLMs) using this syntax. For example, we can call Stable Diffusion: text2image = Replicate(model="stability-ai/stable-diffusion:db21e45d3f7023abc2a46e...
https://python.langchain.com/en/latest/integrations/replicate.html
13e2ec100630-0
.ipynb .pdf Aim Aim# Aim makes it super easy to visualize and debug LangChain executions. Aim tracks inputs and outputs of LLMs and tools, as well as actions of agents. With Aim, you can easily debug and examine an individual execution: Additionally, you have the option to compare multiple executions side by side: Aim ...
https://python.langchain.com/en/latest/integrations/aim_tracking.html
13e2ec100630-1
aim_callback = AimCallbackHandler( repo=".", experiment_name="scenario 1: OpenAI LLM", ) callbacks = [StdOutCallbackHandler(), aim_callback] llm = OpenAI(temperature=0, callbacks=callbacks) The flush_tracker function is used to record LangChain assets on Aim. By default, the session is reset rather than being t...
https://python.langchain.com/en/latest/integrations/aim_tracking.html
13e2ec100630-2
) Scenario 3 The third scenario involves an agent with tools. from langchain.agents import initialize_agent, load_tools from langchain.agents import AgentType # scenario 3 - Agent with Tools tools = load_tools(["serpapi", "llm-math"], llm=llm, callbacks=callbacks) agent = initialize_agent( tools, llm, agent...
https://python.langchain.com/en/latest/integrations/aim_tracking.html
13e2ec100630-3
AnalyticDB By Harrison Chase © Copyright 2023, Harrison Chase. Last updated on May 28, 2023.
https://python.langchain.com/en/latest/integrations/aim_tracking.html
787f041cccc7-0
.md .pdf Tair Contents Installation and Setup Wrappers VectorStore Tair# This page covers how to use the Tair ecosystem within LangChain. Installation and Setup# Install Tair Python SDK with pip install tair. Wrappers# VectorStore# There exists a wrapper around TairVector, allowing you to use it as a vectorstore, whe...
https://python.langchain.com/en/latest/integrations/tair.html
b38628e95544-0
.ipynb .pdf Chat Over Documents with Vectara Contents Pass in chat history Return Source Documents ConversationalRetrievalChain with search_distance ConversationalRetrievalChain with map_reduce ConversationalRetrievalChain with Question Answering with sources ConversationalRetrievalChain with streaming to stdout get_...
https://python.langchain.com/en/latest/integrations/vectara/vectara_chat.html
b38628e95544-1
qa = ConversationalRetrievalChain.from_llm(llm, retriever, memory=memory) <class 'langchain.vectorstores.vectara.Vectara'> query = "What did the president say about Ketanji Brown Jackson" result = qa({"question": query}) result["answer"] " The president said that Ketanji Brown Jackson is one of the nation's top legal m...
https://python.langchain.com/en/latest/integrations/vectara/vectara_chat.html
b38628e95544-2
result['answer'] ' Justice Stephen Breyer.' Return Source Documents# You can also easily return source documents from the ConversationalRetrievalChain. This is useful for when you want to inspect what documents were returned. qa = ConversationalRetrievalChain.from_llm(llm, vectorstore.as_retriever(), return_source_docu...
https://python.langchain.com/en/latest/integrations/vectara/vectara_chat.html
b38628e95544-3
ConversationalRetrievalChain with map_reduce# We can also use different types of combine document chains with the ConversationalRetrievalChain chain. from langchain.chains import LLMChain from langchain.chains.question_answering import load_qa_chain from langchain.chains.conversational_retrieval.prompts import CONDENSE...
https://python.langchain.com/en/latest/integrations/vectara/vectara_chat.html
b38628e95544-4
result = chain({"question": query, "chat_history": chat_history}) result['answer'] ' The president did not mention Ketanji Brown Jackson.\nSOURCES: ../../modules/state_of_the_union.txt' ConversationalRetrievalChain with streaming to stdout# Output from the chain will be streamed to stdout token by token in this example...
https://python.langchain.com/en/latest/integrations/vectara/vectara_chat.html
b38628e95544-5
chat_history = [(query, result["answer"])] query = "Did he mention who she suceeded" result = qa({"question": query, "chat_history": chat_history}) Justice Stephen Breyer. get_chat_history Function# You can also specify a get_chat_history function, which can be used to format the chat_history string. def get_chat_hist...
https://python.langchain.com/en/latest/integrations/vectara/vectara_chat.html
5ef115acffe7-0
.ipynb .pdf Vectara Text Generation Contents Prepare Data Set Up Vector DB Set Up LLM Chain with Custom Prompt Generate Text Vectara Text Generation# This notebook is based on chat_vector_db and adapted to Vectara. Prepare Data# First, we prepare the data. For this example, we fetch a documentation site that consists...
https://python.langchain.com/en/latest/integrations/vectara/vectara_text_generation.html
5ef115acffe7-1
source_chunks = [] splitter = CharacterTextSplitter(separator=" ", chunk_size=1024, chunk_overlap=0) for source in sources: for chunk in splitter.split_text(source.page_content): source_chunks.append(chunk) Cloning into '.'... Set Up Vector DB# Now that we have the documentation content in chunks, let’s put...
https://python.langchain.com/en/latest/integrations/vectara/vectara_text_generation.html
5ef115acffe7-2
print(chain.apply(inputs)) generate_blog_post("environment variables")
https://python.langchain.com/en/latest/integrations/vectara/vectara_text_generation.html
5ef115acffe7-3
[{'text': '\n\nEnvironment variables are an essential part of any development workflow. They provide a way to store and access information that is specific to the environment in which the code is running. This can be especially useful when working with different versions of a language or framework, or when running code...
https://python.langchain.com/en/latest/integrations/vectara/vectara_text_generation.html
5ef115acffe7-4
and any environment variables.\n\nUsing environment variables with the Deno CLI tasks extension is a great way to ensure that your code is running in the correct environment. For example, if you are running a test suite,'}, {'text': '\n\nEnvironment variables are an important part of any programming language, and they ...
https://python.langchain.com/en/latest/integrations/vectara/vectara_text_generation.html
5ef115acffe7-5
&& echo $VAR && deno eval "console.log(\'Deno: \' + Deno.env.get(\'VAR\'))"\n```\n\nThis would output the following:\n\n```\nhello\nDeno: undefined\n```\n\nAs you can see, the value stored in the shell variable is not available in the spawned process.\n\n'}, {'text': '\n\nWhen it comes to developing applications, envir...
https://python.langchain.com/en/latest/integrations/vectara/vectara_text_generation.html
5ef115acffe7-6
is `DENO_DIR`. This environment variable is used to store the directory where Deno will store its files. This includes the Deno executable, the Deno cache, and the Deno configuration files. By setting this environment variable, you can ensure that Deno will always be able to find the files it needs.\n\nFinally, there i...
https://python.langchain.com/en/latest/integrations/vectara/vectara_text_generation.html
5ef115acffe7-7
`Deno.env` has getter and setter methods. Here is example usage:\n\n```ts\nDeno.env.set("FIREBASE_API_KEY", "examplekey123");\nDeno.env.set("FIREBASE_AUTH_DOMAIN", "firebasedomain.com");\n\nconsole.log(Deno.env.get("FIREBASE_API_KEY")); // examplekey123\nconsole.log(Deno.env.get("FIREBASE_AUTH_'}]
https://python.langchain.com/en/latest/integrations/vectara/vectara_text_generation.html
5ef115acffe7-8
Contents Prepare Data Set Up Vector DB Set Up LLM Chain with Custom Prompt Generate Text By Harrison Chase © Copyright 2023, Harrison Chase. Last updated on May 28, 2023.
https://python.langchain.com/en/latest/integrations/vectara/vectara_text_generation.html
2e0d637a16e5-0
.md .pdf Autonomous Agents Contents Baby AGI (Original Repo) AutoGPT (Original Repo) MetaPrompt (Original Repo) Autonomous Agents# Autonomous Agents are agents that designed to be more long running. You give them one or multiple long term goals, and they independently execute towards those goals. The applications com...
https://python.langchain.com/en/latest/use_cases/autonomous_agents.html
16b4067aaebd-0
.rst .pdf Evaluation Contents The Problem The Solution The Examples Other Examples Evaluation# Note Conceptual Guide This section of documentation covers how we approach and think about evaluation in LangChain. Both evaluation of internal chains/agents, but also how we would recommend people building on top of LangCh...
https://python.langchain.com/en/latest/use_cases/evaluation.html
16b4067aaebd-1
We intend this to be a collection of open source datasets for evaluating common chains and agents. We have contributed five datasets of our own to start, but we highly intend this to be a community effort. In order to contribute a dataset, you simply need to join the community and then you will be able to upload datase...
https://python.langchain.com/en/latest/use_cases/evaluation.html
16b4067aaebd-2
SQL Question Answering (Chinook): A notebook showing evaluation of a question-answering task over a SQL database (the Chinook database). Agent Vectorstore: A notebook showing evaluation of an agent doing question answering while routing between two different vector databases. Agent Search + Calculator: A notebook showi...
https://python.langchain.com/en/latest/use_cases/evaluation.html
085c6278ad46-0
.md .pdf Agents Contents Create Your Own Agent Step 1: Create Tools (Optional) Step 2: Modify Agent (Optional) Step 3: Modify Agent Executor Examples Agents# Conceptual Guide Agents can be used for a variety of tasks. Agents combine the decision making ability of a language model with tools in order to create a syste...
https://python.langchain.com/en/latest/use_cases/personal_assistants.html
085c6278ad46-1
Modify the output parser. This is necessary if the agent is having trouble parsing the language model output. (Optional) Step 3: Modify Agent Executor# This step is usually not necessary, as this is pretty general logic. Possible reasons you would want to modify this include adding different stopping conditions, or han...
https://python.langchain.com/en/latest/use_cases/personal_assistants.html
b421f74cf316-0
.md .pdf Extraction Extraction# Conceptual Guide Most APIs and databases still deal with structured information. Therefore, in order to better work with those, it can be useful to extract structured information from text. Examples of this include: Extracting a structured row to insert into a database from a sentence Ex...
https://python.langchain.com/en/latest/use_cases/extraction.html
e58c67d184f1-0
.md .pdf Interacting with APIs Contents Chains Agents Interacting with APIs# Conceptual Guide Lots of data and information is stored behind APIs. This page covers all resources available in LangChain for working with APIs. Chains# If you are just getting started, and you have relatively simple apis, you should get st...
https://python.langchain.com/en/latest/use_cases/apis.html
059ee6d9882b-0
.md .pdf Question Answering over Docs Contents Document Question Answering Adding in sources Additional Related Resources End-to-end examples Question Answering over Docs# Conceptual Guide Question answering in this context refers to question answering over your document data. For question answering over other types ...
https://python.langchain.com/en/latest/use_cases/question_answering.html
059ee6d9882b-1
The LLM response will contain the answer to your question, based on the content of the documents. The recommended way to get started using a question answering chain is: from langchain.chains.question_answering import load_qa_chain chain = load_qa_chain(llm, chain_type="stuff") chain.run(input_documents=docs, question=...
https://python.langchain.com/en/latest/use_cases/question_answering.html
059ee6d9882b-2
Additional Related Resources# Additional related resources include: Utilities for working with Documents: Guides on how to use several of the utilities which will prove helpful for this task, including Text Splitters (for splitting up long documents) and Embeddings & Vectorstores (useful for the above Vector DB example...
https://python.langchain.com/en/latest/use_cases/question_answering.html
c8c29557f89e-0
.md .pdf Chatbots Chatbots# Conceptual Guide Since language models are good at producing text, that makes them ideal for creating chatbots. Aside from the base prompts/LLMs, an important concept to know for Chatbots is memory. Most chat based applications rely on remembering what happened in previous interactions, whic...
https://python.langchain.com/en/latest/use_cases/chatbots.html
b040625c3b28-0
.md .pdf Agent Simulations Contents Simulations with One Agent Simulations with Two Agents Simulations with Multiple Agents Agent Simulations# Agent simulations involve interacting one of more agents with each other. Agent simulations generally involve two main components: Long Term Memory Simulation Environment Spec...
https://python.langchain.com/en/latest/use_cases/agent_simulations.html