Completely refactor the LLM integration method to easily replace the LLM used by each module and optimize the retransmission mechanism.
This commit is contained in:
@@ -6,14 +6,14 @@ Report Engine节点基类
|
||||
import logging
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Any, Dict, Optional
|
||||
from ..llms.base import BaseLLM
|
||||
from ..llms.base import LLMClient
|
||||
from ..state.state import ReportState
|
||||
|
||||
|
||||
class BaseNode(ABC):
|
||||
"""节点基类"""
|
||||
|
||||
def __init__(self, llm_client: BaseLLM, node_name: str = ""):
|
||||
def __init__(self, llm_client: LLMClient, node_name: str = ""):
|
||||
"""
|
||||
初始化节点
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ from datetime import datetime
|
||||
from typing import Dict, Any
|
||||
|
||||
from .base_node import StateMutationNode
|
||||
from ..llms.base import BaseLLM
|
||||
from ..llms.base import LLMClient
|
||||
from ..state.state import ReportState
|
||||
from ..prompts import SYSTEM_PROMPT_HTML_GENERATION
|
||||
# 不再需要text_processing依赖
|
||||
@@ -17,7 +17,7 @@ from ..prompts import SYSTEM_PROMPT_HTML_GENERATION
|
||||
class HTMLGenerationNode(StateMutationNode):
|
||||
"""HTML生成处理节点"""
|
||||
|
||||
def __init__(self, llm_client: BaseLLM):
|
||||
def __init__(self, llm_client: LLMClient):
|
||||
"""
|
||||
初始化HTML生成节点
|
||||
|
||||
|
||||
Reference in New Issue
Block a user