add single choice
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from typing import Any, Dict, List, Optional
|
||||
from src.utils.llm import call_llm_with_template
|
||||
from src.classes.avatar import Avatar
|
||||
from src.utils.config import CONFIG
|
||||
import json
|
||||
|
||||
async def make_decision(
|
||||
@@ -29,10 +30,13 @@ async def make_decision(
|
||||
full_choices_str = f"【当前情境】:{context_desc}\n\n{choices_str}"
|
||||
|
||||
# 3. 调用 AI
|
||||
template_path = CONFIG.paths.templates / "single_choice.txt"
|
||||
result = await call_llm_with_template(
|
||||
"single_choice",
|
||||
avatar_infos=avatar_infos,
|
||||
choices=full_choices_str
|
||||
template_path,
|
||||
infos={
|
||||
"avatar_infos": avatar_infos,
|
||||
"choices": full_choices_str
|
||||
}
|
||||
)
|
||||
|
||||
# 4. 解析结果
|
||||
|
||||
@@ -21,7 +21,7 @@ game:
|
||||
init_npc_num: 12
|
||||
sect_num: 3 # init_npc_num大于sect_num时,会随机选择sect_num个宗门
|
||||
npc_birth_rate_per_month: 0.01
|
||||
fortune_probability: 0.005
|
||||
fortune_probability: 0.1
|
||||
|
||||
df:
|
||||
ids_separator: ";"
|
||||
|
||||
Reference in New Issue
Block a user