[AUR-395, AUR-415] Adopt Example1 Injury pipeline; add .flow() for enabling bottom-up pipeline execution (#32)
* add example1/injury pipeline example * add dotenv * update various api
This commit is contained in:
@@ -33,8 +33,10 @@ class LangchainLLM(LLM):
|
||||
|
||||
def run_raw(self, text: str) -> LLMInterface:
|
||||
pred = self.agent.generate([text])
|
||||
all_text = [each.text for each in pred.generations[0]]
|
||||
return LLMInterface(
|
||||
text=[each.text for each in pred.generations[0]],
|
||||
text=all_text[0] if len(all_text) > 0 else "",
|
||||
candidates=all_text,
|
||||
completion_tokens=pred.llm_output["token_usage"]["completion_tokens"],
|
||||
total_tokens=pred.llm_output["token_usage"]["total_tokens"],
|
||||
prompt_tokens=pred.llm_output["token_usage"]["prompt_tokens"],
|
||||
|
Reference in New Issue
Block a user