mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-10 03:16:51 +08:00
enhancement: introduce Ruff for Python linter for reordering and removing unused imports with automated pre-commit and sytle check (#2366)
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
from typing import Any
|
||||
|
||||
from core.prompt.prompts import RULE_CONFIG_GENERATE_TEMPLATE
|
||||
from langchain.schema import BaseOutputParser, OutputParserException
|
||||
|
||||
from core.prompt.prompts import RULE_CONFIG_GENERATE_TEMPLATE
|
||||
from libs.json_in_md_parser import parse_and_check_json_markdown
|
||||
|
||||
|
||||
|
||||
@@ -2,9 +2,10 @@ import json
|
||||
import re
|
||||
from typing import Any
|
||||
|
||||
from langchain.schema import BaseOutputParser
|
||||
|
||||
from core.model_runtime.errors.invoke import InvokeError
|
||||
from core.prompt.prompts import SUGGESTED_QUESTIONS_AFTER_ANSWER_INSTRUCTION_PROMPT
|
||||
from langchain.schema import BaseOutputParser
|
||||
|
||||
|
||||
class SuggestedQuestionsAfterAnswerOutputParser(BaseOutputParser):
|
||||
|
||||
@@ -4,13 +4,21 @@ import os
|
||||
import re
|
||||
from typing import List, Optional, Tuple, cast
|
||||
|
||||
from core.entities.application_entities import (AdvancedCompletionPromptTemplateEntity, ModelConfigEntity,
|
||||
PromptTemplateEntity)
|
||||
from core.entities.application_entities import (
|
||||
AdvancedCompletionPromptTemplateEntity,
|
||||
ModelConfigEntity,
|
||||
PromptTemplateEntity,
|
||||
)
|
||||
from core.file.file_obj import FileObj
|
||||
from core.memory.token_buffer_memory import TokenBufferMemory
|
||||
from core.model_runtime.entities.message_entities import (AssistantPromptMessage, PromptMessage, PromptMessageRole,
|
||||
SystemPromptMessage, TextPromptMessageContent,
|
||||
UserPromptMessage)
|
||||
from core.model_runtime.entities.message_entities import (
|
||||
AssistantPromptMessage,
|
||||
PromptMessage,
|
||||
PromptMessageRole,
|
||||
SystemPromptMessage,
|
||||
TextPromptMessageContent,
|
||||
UserPromptMessage,
|
||||
)
|
||||
from core.model_runtime.entities.model_entities import ModelPropertyKey
|
||||
from core.model_runtime.model_providers.__base.large_language_model import LargeLanguageModel
|
||||
from core.prompt.prompt_builder import PromptBuilder
|
||||
|
||||
Reference in New Issue
Block a user