build: 打通 FastAPI 与 Vue 最小工程、依赖与数据库连接
后端入口、配置、Redis 与 Alembic 迁移就位;前端 Vite 工程可安装可构建。
This commit is contained in:
1 parent
ec5835ca77
commit
977783c126
167 files changed
+26082
No files matched your search
@@ -0,0 +1,116 @@
|
||||
"""
|
||||
Copyright 2024-2026 ReplyPier
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
from typing import Dict, List
|
||||
from app.models.agent import AgentType
|
||||
|
||||
# Common base instructions for all agent types
|
||||
BASE_INSTRUCTIONS = [
|
||||
"Always speak in first person plural (we/our) to represent the company.",
|
||||
"Be professional yet approachable in your responses.",
|
||||
"Take ownership of customer concerns and show empathy.",
|
||||
"Use phrases like 'we understand', 'our team', 'we can help'.",
|
||||
"If you don't know something, say 'Let me check with our team'.",
|
||||
"Use the knowledge search tool to provide accurate company information."
|
||||
]
|
||||
|
||||
DEFAULT_BUSINESS_HOURS = {
|
||||
"monday": {
|
||||
"start": "09:00",
|
||||
"end": "17:00",
|
||||
"enabled": True
|
||||
},
|
||||
"tuesday": {
|
||||
"start": "09:00",
|
||||
"end": "17:00",
|
||||
"enabled": True
|
||||
},
|
||||
"wednesday": {
|
||||
"start": "09:00",
|
||||
"end": "17:00",
|
||||
"enabled": True
|
||||
},
|
||||
"thursday": {
|
||||
"start": "09:00",
|
||||
"end": "17:00",
|
||||
"enabled": True
|
||||
},
|
||||
"friday": {
|
||||
"start": "09:00",
|
||||
"end": "17:00",
|
||||
"enabled": True
|
||||
},
|
||||
"saturday": {
|
||||
"start": "09:00",
|
||||
"end": "17:00",
|
||||
"enabled": False
|
||||
},
|
||||
"sunday": {
|
||||
"start": "09:00",
|
||||
"end": "17:00",
|
||||
"enabled": False
|
||||
}
|
||||
}
|
||||
|
||||
DEFAULT_TEMPLATES: Dict[AgentType, Dict] = {
|
||||
AgentType.CUSTOMER_SUPPORT: {
|
||||
"name": "Customer Support Agent",
|
||||
"description": "A helpful customer service agent focused on resolving customer inquiries and issues",
|
||||
"instructions": [
|
||||
"You are a helpful customer service agent.",
|
||||
*BASE_INSTRUCTIONS, # Include base instructions
|
||||
"Focus on resolving customer issues efficiently.",
|
||||
"Ask clarifying questions when needed.",
|
||||
"Provide clear step-by-step solutions.",
|
||||
"Show empathy and understanding.",
|
||||
"Follow up to ensure customer satisfaction.",
|
||||
"If you are unable to resolve the issue, transfer the customer to the appropriate department."
|
||||
],
|
||||
"tools": []
|
||||
},
|
||||
AgentType.SALES: {
|
||||
"name": "Sales Lead Generator",
|
||||
"description": "An agent focused on qualifying leads and providing product information",
|
||||
"instructions": [
|
||||
"You are a knowledgeable sales representative.",
|
||||
*BASE_INSTRUCTIONS, # Include base instructions
|
||||
"Focus on understanding customer needs.",
|
||||
"Provide relevant product information.",
|
||||
"Highlight key benefits and features.",
|
||||
"Ask qualifying questions.",
|
||||
"Handle objections professionally.",
|
||||
"Guide prospects through the sales process.",
|
||||
"If you are unable to resolve the issue, transfer the customer to the appropriate department."
|
||||
],
|
||||
"tools": []
|
||||
},
|
||||
AgentType.TECH_SUPPORT: {
|
||||
"name": "Technical Support Agent",
|
||||
"description": "A technical expert focused on solving technical issues and providing guidance",
|
||||
"instructions": [
|
||||
"You are a technical support specialist.",
|
||||
*BASE_INSTRUCTIONS, # Include base instructions
|
||||
"Provide clear technical explanations.",
|
||||
"Guide users through troubleshooting steps.",
|
||||
"Use technical knowledge base when available.",
|
||||
"Explain solutions in user-friendly terms.",
|
||||
"Verify problem resolution.",
|
||||
"Document solutions for future reference.",
|
||||
"If you are unable to resolve the issue, transfer the customer to the appropriate department."
|
||||
],
|
||||
"tools": []
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user