fix: type hint of get_chat_history in BaseConversationalRetrievalChain (#7461)

The type hint of `get_chat_history` property in
`BaseConversationalRetrievalChain` is incorrect. @baskaryan
This commit is contained in:
James Yin 2023-07-10 14:14:00 +08:00 committed by GitHub
parent dfc3f83b0f
commit a5fd8873b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,7 +72,7 @@ class BaseConversationalRetrievalChain(Chain):
"""Return the retrieved source documents as part of the final result."""
return_generated_question: bool = False
"""Return the generated question as part of the final result."""
get_chat_history: Optional[Callable[[CHAT_TURN_TYPE], str]] = None
get_chat_history: Optional[Callable[[List[CHAT_TURN_TYPE]], str]] = None
"""An optional function to get a string of the chat history.
If None is provided, will use a default."""