Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions core/src/main/java/com/google/adk/runner/Runner.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ public Flowable<Event> runAsync(String userId, String sessionId, Content newMess
* @param runConfig Configuration for the agent run.
* @return A Flowable stream of {@link Event} objects generated by the agent during execution.
*/
public Flowable<Event> runAsync(Session session, Content newMessage, RunConfig runConfig) {
public Flowable<Event> runAsync(
Session session, @Nullable Content newMessage, RunConfig runConfig) {
Span span = Telemetry.getTracer().spanBuilder("invocation").startSpan();
try (Scope scope = span.makeCurrent()) {
return Flowable.just(session)
Expand All @@ -213,7 +214,7 @@ public Flowable<Event> runAsync(Session session, Content newMessage, RunConfig r
InvocationContext invocationContext =
newInvocationContext(
sess,
Optional.of(newMessage),
Optional.ofNullable(newMessage),
/* liveRequestQueue= */ Optional.empty(),
runConfig);

Expand Down