Model Runtime (#1858)
Co-authored-by: StyleZhang <jasonapring2015@outlook.com> Co-authored-by: Garfield Dai <dai.hai@foxmail.com> Co-authored-by: chenhe <guchenhe@gmail.com> Co-authored-by: jyong <jyong@dify.ai> Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: Yeuoly <admin@srmxy.cn>
This commit is contained in:
parent
e91dd28a76
commit
d069c668f8
807 changed files with 171310 additions and 23806 deletions
|
|
@ -4,7 +4,7 @@ from typing import Any
|
|||
|
||||
from langchain.schema import BaseOutputParser
|
||||
|
||||
from core.model_providers.error import LLMError
|
||||
from core.model_runtime.errors.invoke import InvokeError
|
||||
from core.prompt.prompts import SUGGESTED_QUESTIONS_AFTER_ANSWER_INSTRUCTION_PROMPT
|
||||
|
||||
|
||||
|
|
@ -19,6 +19,6 @@ class SuggestedQuestionsAfterAnswerOutputParser(BaseOutputParser):
|
|||
if action_match is not None:
|
||||
json_obj = json.loads(action_match.group(1).strip(), strict=False)
|
||||
else:
|
||||
raise LLMError("Could not parse LLM output: {text}")
|
||||
raise InvokeError("Could not parse LLM output: {text}")
|
||||
|
||||
return json_obj
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue