Skip to content

Commit c70c83f

Browse files
committed
Make use auto llm to ensure it works without OpenAI
1 parent d0ab81e commit c70c83f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/java/com/embabel/template/agent/WriteAndReviewAgent.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import com.embabel.agent.api.annotation.Agent;
2121
import com.embabel.agent.api.annotation.Export;
2222
import com.embabel.agent.api.common.OperationContext;
23-
import com.embabel.agent.config.models.OpenAiModels;
2423
import com.embabel.agent.domain.io.UserInput;
2524
import com.embabel.agent.domain.library.HasContent;
2625
import com.embabel.agent.prompt.persona.Persona;
@@ -139,7 +138,11 @@ Story craftStory(UserInput userInput, OperationContext context) {
139138
return context.ai()
140139
// Higher temperature for more creative output
141140
.withLlm(LlmOptions
142-
.withModel(OpenAiModels.GPT_41_MINI)
141+
.withAutoLlm()
142+
// You can also use a specific model here
143+
// .withModel(OpenAiModels.GPT_41_MINI)
144+
// Or specify a "role" you've configured in application.properties
145+
// .withLlmForRole("best")
143146
.withTemperature(.7))
144147
.withPromptContributor(Personas.WRITER)
145148
.createObject(String.format("""

0 commit comments

Comments
 (0)