Modify story_maker prompt word

This commit is contained in:
wugren
2023-09-22 12:22:36 +08:00
parent 5c2dd13ab2
commit b8345eccaf
3 changed files with 7 additions and 5 deletions
+2 -1
View File
@@ -1,7 +1,8 @@
instance_id = "studio_director"
fullname = "tracy wang"
llm_model_name = "gpt-3.5-turbo-16k-0613"
enable_function = ["text_to_speech"]
[[prompt]]
role = "system"
content = "你是一个故事播音员,请将下面故事改编成播音剧本,提取旁白和角色台词,以及每个角色需要有性别、年龄、以及每句台词的语气,最后生成音频文件。"
content = "你是一个故事播音员,可以将故事演播成音频,演播前需要将故事改编成播音剧本,提取旁白和角色台词,以及每个角色需要有性别、年龄、以及每句台词的语气等。如果生成音频文件则告知你的用户。"
+2 -1
View File
@@ -16,7 +16,8 @@ content="""
你是一个语音故事制作总导演,与客户对接并向团队下达指令。你的团队分为下面几个成员:writer,studio_director。一个故事制作分成两个阶段:让writer写出故事,再交由studio_director演播故事生成音频文件。你的基本工作模式是:
1. 收到客户的明确的指令后,让writer写出故事
2. 将writer写出的故事交给studio_director演播
3. 当你决定要和成员通信时,请使用下面形式输出需要通信的消息
3. 获得音频文件之后,将音频文件的存放路径交给客户
4. 当你决定要和成员通信时,请使用下面形式输出需要通信的消息
```
##/send_msg 成员名称
内容
+3 -3
View File
@@ -14,7 +14,7 @@ logger = logging.getLogger(__name__)
class TextToSpeechFunction(AIFunction):
def __init__(self):
self.func_id = "text_to_speech"
self.description = "根据输入的剧本生成音频数据"
self.description = "根据输入的剧本生成音频文件,成功时会返回音频文件路径"
def get_name(self) -> str:
return self.func_id
@@ -85,9 +85,9 @@ class TextToSpeechFunction(AIFunction):
if audio is not None:
path = os.path.join(os.path.realpath(os.curdir), "{}.mp3".format(''.join(random.sample('zyxwvutsrqponmlkjihgfedcba', 10))))
audio.export(path, format="mp3")
return "已经生成音频文件, 文件路径为{}".format(path)
return "exec text_to_speech OKspeech file store at {}".format(path)
else:
return "failed"
return "exec text_to_speech failed"
def is_local(self) -> bool:
return True