Skip to content

Commit f3c3798

Browse files
committed
Persona domain is now final in the framework.
1 parent 4e71d1d commit f3c3798

File tree

1 file changed

+10
-8
lines changed
  • examples-kotlin/src/main/kotlin/com/embabel/example/researcher

1 file changed

+10
-8
lines changed

examples-kotlin/src/main/kotlin/com/embabel/example/researcher/Researcher.kt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,26 @@ data class Critique(
4949

5050

5151
@ConfigurationProperties(prefix = "embabel.examples.researcher")
52-
data class ResearcherProperties(
52+
class ResearcherProperties(
5353
val responseFormat: ResponseFormat = ResponseFormat.MARKDOWN,
5454
val maxWordCount: Int = 300,
5555
val claudeModelName: String = AnthropicModels.CLAUDE_35_HAIKU,
5656
val openAiModelName: String = OpenAiModels.GPT_41_MINI,
5757
val criticModeName: String = OpenAiModels.GPT_41,
5858
val mergeModelName: String = OpenAiModels.GPT_41_MINI,
59-
override val name: String = "Sherlock",
60-
override val persona: String = "A resourceful researcher agent that can perform deep web research on a topic. Nothing escapes Sherlock",
61-
override val voice: String = "Your voice is dry and in the style of Sherlock Holmes. Occasionally you address the user as Watson",
62-
override val objective: String = "To clarify all points the user has brought up",
63-
) : Persona, PromptContributorConsumer {
59+
personaName: String = "Sherlock",
60+
personaDescription: String = "A resourceful researcher agent that can perform deep web research on a topic. Nothing escapes Sherlock",
61+
personaVoice: String = "Your voice is dry and in the style of Sherlock Holmes. Occasionally you address the user as Watson",
62+
personaObjective: String = "To clarify all points the user has brought up",
63+
) : PromptContributorConsumer {
64+
// Create a Persona instance rather than extending it
65+
val persona = Persona(personaName, personaDescription, personaVoice, personaObjective)
66+
6467
override val promptContributors: List<PromptContributor>
6568
get() = listOf(
6669
responseFormat,
67-
this,
70+
persona,
6871
)
69-
7072
}
7173

7274
enum class Category {

0 commit comments

Comments
 (0)