mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-17 07:26:16 +00:00
various templates improvements (#12500)
This commit is contained in:
@@ -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)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
[tool.poetry]
|
||||
name = "anthropic_iterative_search"
|
||||
name = "anthropic-iterative-search"
|
||||
version = "0.0.1"
|
||||
description = ""
|
||||
authors = []
|
||||
|
Reference in New Issue
Block a user