Add Citation pipeline (#78)
* add rerankers in retrieving pipeline * update example MVP pipeline * add citation pipeline and function call interface * change return type of QA and AgentPipeline to Document
This commit is contained in:
committed by
GitHub
parent
f8b8d86d4e
commit
cc1e75b3c6
@@ -70,6 +70,7 @@ class LangchainChatLLM(ChatLLM):
|
||||
|
||||
pred = self.agent.generate(messages=[input_], **kwargs)
|
||||
all_text = [each.text for each in pred.generations[0]]
|
||||
all_messages = [each.message for each in pred.generations[0]]
|
||||
|
||||
completion_tokens, total_tokens, prompt_tokens = 0, 0, 0
|
||||
try:
|
||||
@@ -88,6 +89,7 @@ class LangchainChatLLM(ChatLLM):
|
||||
completion_tokens=completion_tokens,
|
||||
total_tokens=total_tokens,
|
||||
prompt_tokens=prompt_tokens,
|
||||
messages=all_messages,
|
||||
logits=[],
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user