添加对话场景的prompt配置
This commit is contained in:
parent
333176a13d
commit
1cb89e167c
7
AIGC/AIGC.code-workspace
Normal file
7
AIGC/AIGC.code-workspace
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
]
|
||||
}
|
@ -90,7 +90,7 @@ def process_prompt(promptFromUE: str) -> Tuple[bool, str]:
|
||||
prompt = f"""
|
||||
你是一个游戏NPC对话生成器。请严格按以下要求生成两个路人NPC({persons[0]["name"]}和{persons[1]["name"]})的日常对话:
|
||||
1. 生成【2轮完整对话】,每轮包含双方各一次发言(共4句)
|
||||
2. 对话场景:中世纪奇幻小镇的日常场景(如市场/酒馆/街道)
|
||||
2. 对话场景:{dialog_scene}
|
||||
3. 角色设定:
|
||||
{persons[0]["name"]}:{persons[0]["job"]}
|
||||
{persons[1]["name"]}:{persons[1]["job"]}
|
||||
@ -169,7 +169,7 @@ async def generateAIChat(prompt: str, websocket: WebSocket):
|
||||
await senddata(websocket, -1, messages={"ai生成格式不正确"})
|
||||
else:
|
||||
core_dialog = match.group(1).strip()
|
||||
logger.log(logging.INFO, "AI内容处理:" + core_dialog)
|
||||
logger.log(logging.INFO, "AI内容处理:\n" + core_dialog)
|
||||
await senddata(websocket, 1, core_dialog.split('\n'))
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user