mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-11 13:55:03 +00:00
bump to version 0.0.52 (#470)
This commit is contained in:
parent
e88e66f982
commit
0f1df0dc2c
@ -34,6 +34,7 @@ def _load_stuff_chain(
|
|||||||
llm_chain=llm_chain,
|
llm_chain=llm_chain,
|
||||||
document_variable_name=document_variable_name,
|
document_variable_name=document_variable_name,
|
||||||
document_prompt=stuff_prompt.EXAMPLE_PROMPT,
|
document_prompt=stuff_prompt.EXAMPLE_PROMPT,
|
||||||
|
verbose=verbose,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -58,6 +59,7 @@ def _load_map_reduce_chain(
|
|||||||
llm_chain=reduce_chain,
|
llm_chain=reduce_chain,
|
||||||
document_variable_name=combine_document_variable_name,
|
document_variable_name=combine_document_variable_name,
|
||||||
document_prompt=document_prompt,
|
document_prompt=document_prompt,
|
||||||
|
verbose=verbose,
|
||||||
)
|
)
|
||||||
if collapse_prompt is None:
|
if collapse_prompt is None:
|
||||||
collapse_chain = None
|
collapse_chain = None
|
||||||
@ -82,6 +84,7 @@ def _load_map_reduce_chain(
|
|||||||
combine_document_chain=combine_document_chain,
|
combine_document_chain=combine_document_chain,
|
||||||
document_variable_name=map_reduce_document_variable_name,
|
document_variable_name=map_reduce_document_variable_name,
|
||||||
collapse_document_chain=collapse_chain,
|
collapse_document_chain=collapse_chain,
|
||||||
|
verbose=verbose,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -106,6 +109,7 @@ def _load_refine_chain(
|
|||||||
document_variable_name=document_variable_name,
|
document_variable_name=document_variable_name,
|
||||||
initial_response_name=initial_response_name,
|
initial_response_name=initial_response_name,
|
||||||
document_prompt=document_prompt,
|
document_prompt=document_prompt,
|
||||||
|
verbose=verbose,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -119,6 +123,8 @@ def load_qa_with_sources_chain(
|
|||||||
llm: Language Model to use in the chain.
|
llm: Language Model to use in the chain.
|
||||||
chain_type: Type of document combining chain to use. Should be one of "stuff",
|
chain_type: Type of document combining chain to use. Should be one of "stuff",
|
||||||
"map_reduce", and "refine".
|
"map_reduce", and "refine".
|
||||||
|
verbose: Whether chains should be run in verbose mode or not. Note that this
|
||||||
|
applies to all chains that make up the final chain.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
A chain to use for question answering with sources.
|
A chain to use for question answering with sources.
|
||||||
|
@ -32,7 +32,10 @@ def _load_stuff_chain(
|
|||||||
llm_chain = LLMChain(llm=llm, prompt=prompt, verbose=verbose)
|
llm_chain = LLMChain(llm=llm, prompt=prompt, verbose=verbose)
|
||||||
# TODO: document prompt
|
# TODO: document prompt
|
||||||
return StuffDocumentsChain(
|
return StuffDocumentsChain(
|
||||||
llm_chain=llm_chain, document_variable_name=document_variable_name, **kwargs
|
llm_chain=llm_chain,
|
||||||
|
document_variable_name=document_variable_name,
|
||||||
|
verbose=verbose,
|
||||||
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -53,7 +56,9 @@ def _load_map_reduce_chain(
|
|||||||
reduce_chain = LLMChain(llm=_reduce_llm, prompt=combine_prompt, verbose=verbose)
|
reduce_chain = LLMChain(llm=_reduce_llm, prompt=combine_prompt, verbose=verbose)
|
||||||
# TODO: document prompt
|
# TODO: document prompt
|
||||||
combine_document_chain = StuffDocumentsChain(
|
combine_document_chain = StuffDocumentsChain(
|
||||||
llm_chain=reduce_chain, document_variable_name=combine_document_variable_name
|
llm_chain=reduce_chain,
|
||||||
|
document_variable_name=combine_document_variable_name,
|
||||||
|
verbose=verbose,
|
||||||
)
|
)
|
||||||
if collapse_prompt is None:
|
if collapse_prompt is None:
|
||||||
collapse_chain = None
|
collapse_chain = None
|
||||||
@ -77,6 +82,7 @@ def _load_map_reduce_chain(
|
|||||||
combine_document_chain=combine_document_chain,
|
combine_document_chain=combine_document_chain,
|
||||||
document_variable_name=map_reduce_document_variable_name,
|
document_variable_name=map_reduce_document_variable_name,
|
||||||
collapse_document_chain=collapse_chain,
|
collapse_document_chain=collapse_chain,
|
||||||
|
verbose=verbose,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -99,6 +105,7 @@ def _load_refine_chain(
|
|||||||
refine_llm_chain=refine_chain,
|
refine_llm_chain=refine_chain,
|
||||||
document_variable_name=document_variable_name,
|
document_variable_name=document_variable_name,
|
||||||
initial_response_name=initial_response_name,
|
initial_response_name=initial_response_name,
|
||||||
|
verbose=verbose,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -112,6 +119,8 @@ def load_qa_chain(
|
|||||||
llm: Language Model to use in the chain.
|
llm: Language Model to use in the chain.
|
||||||
chain_type: Type of document combining chain to use. Should be one of "stuff",
|
chain_type: Type of document combining chain to use. Should be one of "stuff",
|
||||||
"map_reduce", and "refine".
|
"map_reduce", and "refine".
|
||||||
|
verbose: Whether chains should be run in verbose mode or not. Note that this
|
||||||
|
applies to all chains that make up the final chain.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
A chain to use for question answering.
|
A chain to use for question answering.
|
||||||
|
@ -28,7 +28,10 @@ def _load_stuff_chain(
|
|||||||
llm_chain = LLMChain(llm=llm, prompt=prompt, verbose=verbose)
|
llm_chain = LLMChain(llm=llm, prompt=prompt, verbose=verbose)
|
||||||
# TODO: document prompt
|
# TODO: document prompt
|
||||||
return StuffDocumentsChain(
|
return StuffDocumentsChain(
|
||||||
llm_chain=llm_chain, document_variable_name=document_variable_name, **kwargs
|
llm_chain=llm_chain,
|
||||||
|
document_variable_name=document_variable_name,
|
||||||
|
verbose=verbose,
|
||||||
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -49,7 +52,9 @@ def _load_map_reduce_chain(
|
|||||||
reduce_chain = LLMChain(llm=_reduce_llm, prompt=combine_prompt, verbose=verbose)
|
reduce_chain = LLMChain(llm=_reduce_llm, prompt=combine_prompt, verbose=verbose)
|
||||||
# TODO: document prompt
|
# TODO: document prompt
|
||||||
combine_document_chain = StuffDocumentsChain(
|
combine_document_chain = StuffDocumentsChain(
|
||||||
llm_chain=reduce_chain, document_variable_name=combine_document_variable_name
|
llm_chain=reduce_chain,
|
||||||
|
document_variable_name=combine_document_variable_name,
|
||||||
|
verbose=verbose,
|
||||||
)
|
)
|
||||||
if collapse_prompt is None:
|
if collapse_prompt is None:
|
||||||
collapse_chain = None
|
collapse_chain = None
|
||||||
@ -73,6 +78,7 @@ def _load_map_reduce_chain(
|
|||||||
combine_document_chain=combine_document_chain,
|
combine_document_chain=combine_document_chain,
|
||||||
document_variable_name=map_reduce_document_variable_name,
|
document_variable_name=map_reduce_document_variable_name,
|
||||||
collapse_document_chain=collapse_chain,
|
collapse_document_chain=collapse_chain,
|
||||||
|
verbose=verbose,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -96,6 +102,7 @@ def _load_refine_chain(
|
|||||||
refine_llm_chain=refine_chain,
|
refine_llm_chain=refine_chain,
|
||||||
document_variable_name=document_variable_name,
|
document_variable_name=document_variable_name,
|
||||||
initial_response_name=initial_response_name,
|
initial_response_name=initial_response_name,
|
||||||
|
verbose=verbose,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -109,6 +116,8 @@ def load_summarize_chain(
|
|||||||
llm: Language Model to use in the chain.
|
llm: Language Model to use in the chain.
|
||||||
chain_type: Type of document combining chain to use. Should be one of "stuff",
|
chain_type: Type of document combining chain to use. Should be one of "stuff",
|
||||||
"map_reduce", and "refine".
|
"map_reduce", and "refine".
|
||||||
|
verbose: Whether chains should be run in verbose mode or not. Note that this
|
||||||
|
applies to all chains that make up the final chain.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
A chain to use for summarizing.
|
A chain to use for summarizing.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "langchain"
|
name = "langchain"
|
||||||
version = "0.0.51"
|
version = "0.0.52"
|
||||||
description = "Building applications with LLMs through composability"
|
description = "Building applications with LLMs through composability"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
Loading…
Reference in New Issue
Block a user