mirror of
https://github.com/hwchase17/langchain
synced 2024-10-31 15:20:26 +00:00
00a09e1b71
Ran ```python import glob import re def update_prompt(x): return re.sub( r"(?P<start>\b)PromptTemplate\(template=(?P<template>.*), input_variables=(?:.*)\)", "\g<start>PromptTemplate.from_template(\g<template>)", x ) for fn in glob.glob("docs/**/*", recursive=True): try: content = open(fn).readlines() except: continue content = [update_prompt(l) for l in content] with open(fn, "w") as f: f.write("".join(content)) ``` |
||
---|---|---|
.. | ||
deployments | ||
evaluation | ||
privacy | ||
safety | ||
debugging.md | ||
fallbacks.ipynb | ||
local_llms.ipynb | ||
model_laboratory.ipynb | ||
pydantic_compatibility.md |