checkpoint
This commit is contained in:
parent
94f94cbebf
commit
d9f12ec0de
5 changed files with 63 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
from typing import Optional
|
||||
from enum import Enum
|
||||
from .model import TypedModel
|
||||
from .model import TypedModel, BaseModel
|
||||
|
||||
|
||||
class AgentType(str, Enum):
|
||||
|
|
@ -9,11 +9,12 @@ class AgentType(str, Enum):
|
|||
CHAT_GPT = "chat_gpt"
|
||||
ECHO = "echo"
|
||||
INFORMATION_RETRIEVAL = "information_retrieval"
|
||||
RESTFUL_USER_IMPLEMENTED = "restful_user_implemented"
|
||||
|
||||
|
||||
class AgentConfig(TypedModel, type=AgentType.BASE):
|
||||
initial_message: Optional[str] = None
|
||||
|
||||
generate_responses: bool = True
|
||||
|
||||
class LLMAgentConfig(AgentConfig, type=AgentType.LLM):
|
||||
prompt_preamble: str
|
||||
|
|
@ -35,3 +36,14 @@ class InformationRetrievalAgentConfig(
|
|||
|
||||
class EchoAgentConfig(AgentConfig, type=AgentType.ECHO):
|
||||
pass
|
||||
|
||||
class RESTfulUserImplementedAgentConfig(AgentConfig, type=AgentType.RESTFUL_USER_IMPLEMENTED):
|
||||
class EndpointConfig(BaseModel):
|
||||
url: str
|
||||
method: str = "POST"
|
||||
input_param_name: str = "human_input"
|
||||
output_jsonpath: str = "response"
|
||||
|
||||
respond: EndpointConfig
|
||||
generate_response: Optional[EndpointConfig]
|
||||
update_last_bot_message_on_cut_off: Optional[EndpointConfig]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue