python SDK
This commit is contained in:
commit
6dc9fceeb5
18 changed files with 482 additions and 0 deletions
37
vocode/models/agent.py
Normal file
37
vocode/models/agent.py
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
from typing import Optional
|
||||
from enum import Enum
|
||||
from .model import TypedModel
|
||||
|
||||
|
||||
class AgentType(str, Enum):
|
||||
BASE = "base"
|
||||
LLM = "llm"
|
||||
CHAT_GPT = "chat_gpt"
|
||||
ECHO = "echo"
|
||||
INFORMATION_RETRIEVAL = "information_retrieval"
|
||||
|
||||
|
||||
class AgentConfig(TypedModel, type=AgentType.BASE):
|
||||
initial_message: Optional[str] = None
|
||||
|
||||
|
||||
class LLMAgentConfig(AgentConfig, type=AgentType.LLM):
|
||||
prompt_preamble: str
|
||||
expected_first_prompt: Optional[str] = None
|
||||
|
||||
class ChatGPTAgentConfig(AgentConfig, type=AgentType.CHAT_GPT):
|
||||
prompt_preamble: str
|
||||
expected_first_prompt: Optional[str] = None
|
||||
|
||||
class InformationRetrievalAgentConfig(
|
||||
AgentConfig, type=AgentType.INFORMATION_RETRIEVAL
|
||||
):
|
||||
recipient_descriptor: str
|
||||
caller_descriptor: str
|
||||
goal_description: str
|
||||
fields: list[str]
|
||||
# TODO: add fields for IVR, voicemail
|
||||
|
||||
|
||||
class EchoAgentConfig(AgentConfig, type=AgentType.ECHO):
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue