various templates improvements (#12500)

This commit is contained in:
Harrison Chase
2023-10-28 22:13:22 -07:00
committed by GitHub
parent d85d4d7822
commit 9e0ae56287
50 changed files with 462 additions and 282 deletions

View File

@@ -1,5 +1,6 @@
from langchain.chat_models import ChatAnthropic
from langchain.prompts import ChatPromptTemplate
from langchain.pydantic_v1 import BaseModel
from langchain.schema.output_parser import StrOutputParser
from .prompts import answer_prompt
@@ -13,3 +14,12 @@ chain = {
"query": lambda x: x["query"],
"information": executor | (lambda x: x["output"])
} | prompt | model | StrOutputParser()
# Add typing for the inputs to be used in the playground
class Inputs(BaseModel):
query: str
chain = chain.with_types(input_type=Inputs)

View File

@@ -1,5 +1,5 @@
[tool.poetry]
name = "anthropic_iterative_search"
name = "anthropic-iterative-search"
version = "0.0.1"
description = ""
authors = []