|
45 | 45 | import com.google.adk.agents.ConfigAgentUtils.ConfigurationException; |
46 | 46 | import com.google.adk.codeexecutors.BaseCodeExecutor; |
47 | 47 | import com.google.adk.events.Event; |
48 | | -import com.google.adk.examples.BaseExampleProvider; |
49 | | -import com.google.adk.examples.Example; |
50 | 48 | import com.google.adk.flows.llmflows.AutoFlow; |
51 | 49 | import com.google.adk.flows.llmflows.BaseLlmFlow; |
52 | 50 | import com.google.adk.flows.llmflows.SingleFlow; |
@@ -97,8 +95,6 @@ public enum IncludeContents { |
97 | 95 | private final List<Object> toolsUnion; |
98 | 96 | private final ImmutableList<BaseToolset> toolsets; |
99 | 97 | private final Optional<GenerateContentConfig> generateContentConfig; |
100 | | - // TODO: Remove exampleProvider field - examples should only be provided via ExampleTool |
101 | | - private final Optional<BaseExampleProvider> exampleProvider; |
102 | 98 | private final IncludeContents includeContents; |
103 | 99 |
|
104 | 100 | private final boolean planning; |
@@ -132,7 +128,6 @@ protected LlmAgent(Builder builder) { |
132 | 128 | this.globalInstruction = |
133 | 129 | requireNonNullElse(builder.globalInstruction, new Instruction.Static("")); |
134 | 130 | this.generateContentConfig = Optional.ofNullable(builder.generateContentConfig); |
135 | | - this.exampleProvider = Optional.ofNullable(builder.exampleProvider); |
136 | 131 | this.includeContents = requireNonNullElse(builder.includeContents, IncludeContents.DEFAULT); |
137 | 132 | this.planning = builder.planning != null && builder.planning; |
138 | 133 | this.maxSteps = Optional.ofNullable(builder.maxSteps); |
@@ -180,7 +175,6 @@ public static class Builder extends BaseAgent.Builder<Builder> { |
180 | 175 | private Instruction globalInstruction; |
181 | 176 | private ImmutableList<Object> toolsUnion; |
182 | 177 | private GenerateContentConfig generateContentConfig; |
183 | | - private BaseExampleProvider exampleProvider; |
184 | 178 | private IncludeContents includeContents; |
185 | 179 | private Boolean planning; |
186 | 180 | private Integer maxSteps; |
@@ -253,26 +247,6 @@ public Builder generateContentConfig(GenerateContentConfig generateContentConfig |
253 | 247 | return this; |
254 | 248 | } |
255 | 249 |
|
256 | | - // TODO: Remove these example provider methods and only use ExampleTool for providing examples. |
257 | | - // Direct example methods should be deprecated in favor of using ExampleTool consistently. |
258 | | - @CanIgnoreReturnValue |
259 | | - public Builder exampleProvider(BaseExampleProvider exampleProvider) { |
260 | | - this.exampleProvider = exampleProvider; |
261 | | - return this; |
262 | | - } |
263 | | - |
264 | | - @CanIgnoreReturnValue |
265 | | - public Builder exampleProvider(List<Example> examples) { |
266 | | - this.exampleProvider = (unused) -> examples; |
267 | | - return this; |
268 | | - } |
269 | | - |
270 | | - @CanIgnoreReturnValue |
271 | | - public Builder exampleProvider(Example... examples) { |
272 | | - this.exampleProvider = (unused) -> ImmutableList.copyOf(examples); |
273 | | - return this; |
274 | | - } |
275 | | - |
276 | 250 | @CanIgnoreReturnValue |
277 | 251 | public Builder includeContents(IncludeContents includeContents) { |
278 | 252 | this.includeContents = includeContents; |
@@ -812,11 +786,6 @@ public Optional<GenerateContentConfig> generateContentConfig() { |
812 | 786 | return generateContentConfig; |
813 | 787 | } |
814 | 788 |
|
815 | | - // TODO: Remove this getter - examples should only be provided via ExampleTool |
816 | | - public Optional<BaseExampleProvider> exampleProvider() { |
817 | | - return exampleProvider; |
818 | | - } |
819 | | - |
820 | 789 | public IncludeContents includeContents() { |
821 | 790 | return includeContents; |
822 | 791 | } |
|
0 commit comments