mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-12 21:11:43 +00:00
WIP: sql research assistant (#14240)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
from langchain.pydantic_v1 import BaseModel
|
||||
from langchain.schema.runnable 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(
|
||||
chain.invoke({"question": "who is typically older: point guards or centers?"})
|
||||
)
|
Reference in New Issue
Block a user