Skip to content

Commit ca32585

Browse files
committed
Added option to configure the length of each section
1 parent 1758103 commit ca32585

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "neuralnoise"
3-
version = "0.7.0"
3+
version = "0.9.0"
44
description = "An AI-powered podcast studio that uses multiple AI agents working together."
55
authors = [
66
{ name = "Leonardo Piñeyro", email = "[email protected]" }

src/neuralnoise/prompts/script_generation.system.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
will..."
4242
- Avoid formal introductions or conclusions for sections/segments.
4343
- Allow speakers to ask and answer questions naturally.
44-
- Create 4-10 segments per section, with a mix of short and long segments.
44+
- Create ${min_segments}-${max_segments} segments per section, with a mix of short and long segments.
4545
- Include some very short segments (1-2 words) for quick interactions and expressing emotions or
4646
reactions. For example: "Yeah.", "Right?", "So cool."
4747
- Use pauses (blank_duration) where appropriate.

src/neuralnoise/studio/agents.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ def script_generator_agent(self) -> AssistantAgent:
9393
agent = AssistantAgent(
9494
name="ScriptGeneratorAgent",
9595
system_message=self.load_prompt(
96-
"script_generation.system", language=self.language
96+
"script_generation.system",
97+
language=self.language,
98+
min_segments=str(self.config.show.min_segments),
99+
max_segments=str(self.config.show.max_segments),
97100
),
98101
llm_config={"config_list": [self.llm_json_mode_config]},
99102
)

src/neuralnoise/types.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ class Show(BaseModelDisplay):
5353
about: str
5454
language: str
5555

56+
min_segments: int = 4
57+
max_segments: int = 10
58+
5659

5760
class StudioConfig(BaseModelDisplay):
5861
show: Show

0 commit comments

Comments
 (0)