mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
3a2eb6e12b
Added noqa for existing prints. Can slowly remove / will prevent more being intro'd
23 lines
586 B
Python
23 lines
586 B
Python
from langchain.pydantic_v1 import BaseModel
|
|
from langchain_core.runnables import RunnablePassthrough
|
|
|
|
from sql_research_assistant.search.web import chain as search_chain
|
|
from sql_research_assistant.writer import chain as writer_chain
|
|
|
|
chain_notypes = (
|
|
RunnablePassthrough().assign(research_summary=search_chain) | writer_chain
|
|
)
|
|
|
|
|
|
class InputType(BaseModel):
|
|
question: str
|
|
|
|
|
|
chain = chain_notypes.with_types(input_type=InputType)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
print( # noqa: T201
|
|
chain.invoke({"question": "who is typically older: point guards or centers?"})
|
|
)
|