mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-21 16:56:53 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user