Spaces:
Sleeping
Sleeping
Upload 67 files
Browse files
src/agents/agent_transcript/func.py
CHANGED
|
@@ -150,9 +150,7 @@ def script_re_outline(state: State):
|
|
| 150 |
response = chain_script_re_outline.invoke(
|
| 151 |
{
|
| 152 |
"messages": state["messages"],
|
| 153 |
-
"prompt": state["script_re_outline_prompt"]
|
| 154 |
-
+ "Output language must in: "
|
| 155 |
-
+ language,
|
| 156 |
}
|
| 157 |
)
|
| 158 |
return {
|
|
@@ -174,6 +172,9 @@ def script_writer_init(state: State):
|
|
| 174 |
|
| 175 |
def script_writer_single(state: State):
|
| 176 |
"""Generate a single script"""
|
|
|
|
|
|
|
|
|
|
| 177 |
current_index = state.get("current_script_index", 0)
|
| 178 |
script_count = state.get("script_count", 10)
|
| 179 |
target_word_count = state.get("target_word_count", 8000)
|
|
@@ -198,7 +199,10 @@ def script_writer_single(state: State):
|
|
| 198 |
response = chain_script_writer.invoke(
|
| 199 |
{
|
| 200 |
"messages": current_messages,
|
| 201 |
-
"prompt": state["script_writer_prompt"]
|
|
|
|
|
|
|
|
|
|
| 202 |
}
|
| 203 |
)
|
| 204 |
script_out.append(response.content)
|
|
|
|
| 150 |
response = chain_script_re_outline.invoke(
|
| 151 |
{
|
| 152 |
"messages": state["messages"],
|
| 153 |
+
"prompt": state["script_re_outline_prompt"],
|
|
|
|
|
|
|
| 154 |
}
|
| 155 |
)
|
| 156 |
return {
|
|
|
|
| 172 |
|
| 173 |
def script_writer_single(state: State):
|
| 174 |
"""Generate a single script"""
|
| 175 |
+
language = state["language"]
|
| 176 |
+
if not language:
|
| 177 |
+
language = "English"
|
| 178 |
current_index = state.get("current_script_index", 0)
|
| 179 |
script_count = state.get("script_count", 10)
|
| 180 |
target_word_count = state.get("target_word_count", 8000)
|
|
|
|
| 199 |
response = chain_script_writer.invoke(
|
| 200 |
{
|
| 201 |
"messages": current_messages,
|
| 202 |
+
"prompt": state["script_writer_prompt"]
|
| 203 |
+
+ "Output script language must in: "
|
| 204 |
+
+ language
|
| 205 |
+
+ "Language",
|
| 206 |
}
|
| 207 |
)
|
| 208 |
script_out.append(response.content)
|