mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-06 05:08:20 +00:00
Docs: Fix broken line breaks in snippets (#11523)
**Description:** This PR fix some code snippets that have raw `\n`'s instead of actual line breaks. **Issue:** Currently some snippets look like this:  Affected pages: - https://python.langchain.com/docs/integrations/providers/predictionguard#example-usage - https://python.langchain.com/docs/modules/agents/how_to/custom_llm_agent#set-up-environment - https://python.langchain.com/docs/modules/chains/foundational/llm_chain#get-started - https://python.langchain.com/docs/integrations/providers/shaleprotocol#how-to **Tag maintainer:** @hwchase17
This commit is contained in:
parent
316dddc7cd
commit
fd7f129f10
@ -37,7 +37,8 @@ import os
|
||||
|
||||
import predictionguard as pg
|
||||
from langchain.llms import PredictionGuard
|
||||
from langchain.prompts import PromptTemplate\nfrom langchain.chains import LLMChain
|
||||
from langchain.prompts import PromptTemplate
|
||||
from langchain.chains import LLMChain
|
||||
|
||||
# Your Prediction Guard API key. Get one at predictionguard.com
|
||||
os.environ["PREDICTIONGUARD_TOKEN"] = "<your Prediction Guard access token>"
|
||||
@ -76,7 +77,8 @@ Basic LLM Chaining with the Prediction Guard wrapper:
|
||||
```python
|
||||
import os
|
||||
|
||||
from langchain.prompts import PromptTemplate\nfrom langchain.chains import LLMChain
|
||||
from langchain.prompts import PromptTemplate
|
||||
from langchain.chains import LLMChain
|
||||
from langchain.llms import PredictionGuard
|
||||
|
||||
# Optional, add your OpenAI API Key. This is optional, as Prediction Guard allows
|
||||
|
@ -20,7 +20,8 @@ As of June 2023, the API supports Vicuna-13B by default. We are going to support
|
||||
For example
|
||||
```python
|
||||
from langchain.llms import OpenAI
|
||||
from langchain.prompts import PromptTemplate\nfrom langchain.chains import LLMChain
|
||||
from langchain.prompts import PromptTemplate
|
||||
from langchain.chains import LLMChain
|
||||
|
||||
import os
|
||||
os.environ['OPENAI_API_BASE'] = "https://shale.live/v1"
|
||||
|
@ -20,7 +20,9 @@ Do necessary imports, etc.
|
||||
```python
|
||||
from langchain.agents import Tool, AgentExecutor, LLMSingleActionAgent, AgentOutputParser
|
||||
from langchain.prompts import StringPromptTemplate
|
||||
from langchain.llms import OpenAI\nfrom langchain.utilities import SerpAPIWrapper\nfrom langchain.chains import LLMChain
|
||||
from langchain.llms import OpenAI
|
||||
from langchain.utilities import SerpAPIWrapper
|
||||
from langchain.chains import LLMChain
|
||||
from typing import List, Union
|
||||
from langchain.schema import AgentAction, AgentFinish, OutputParserException
|
||||
import re
|
||||
|
@ -1,5 +1,7 @@
|
||||
```python
|
||||
from langchain.prompts import PromptTemplate\nfrom langchain.llms import OpenAI\nfrom langchain.chains import LLMChain
|
||||
from langchain.prompts import PromptTemplate
|
||||
from langchain.llms import OpenAI
|
||||
from langchain.chains import LLMChain
|
||||
|
||||
prompt_template = "What is a good name for a company that makes {product}?"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user