File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
core/src/main/java/com/google/adk Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,10 @@ public Completable sendContent(Content content) {
206206 .build ());
207207 } else {
208208 return sendClientContentInternal (
209- LiveSendClientContentParameters .builder ().turns (ImmutableList .of (content )).build ());
209+ LiveSendClientContentParameters .builder ()
210+ .turns (ImmutableList .of (content ))
211+ .turnComplete (true )
212+ .build ());
210213 }
211214 }
212215
Original file line number Diff line number Diff line change 2323import com .google .errorprone .annotations .CanIgnoreReturnValue ;
2424import com .google .genai .types .FunctionDeclaration ;
2525import com .google .genai .types .GenerateContentConfig ;
26+ import com .google .genai .types .LiveConnectConfig ;
2627import com .google .genai .types .Tool ;
2728import io .reactivex .rxjava3 .core .Completable ;
2829import io .reactivex .rxjava3 .core .Single ;
@@ -122,7 +123,16 @@ public Completable processLlmRequest(
122123 .add (toolWithFunctionDeclarations )
123124 .build ())
124125 .build ();
126+ LiveConnectConfig liveConnectConfig =
127+ llmRequest .liveConnectConfig ().toBuilder ()
128+ .tools (
129+ new ImmutableList .Builder <Tool >()
130+ .addAll (toolsWithoutFunctionDeclarations )
131+ .add (toolWithFunctionDeclarations )
132+ .build ())
133+ .build ();
125134 llmRequestBuilder .config (generateContentConfig );
135+ llmRequestBuilder .liveConnectConfig (liveConnectConfig );
126136 return Completable .complete ();
127137 }
128138
You can’t perform that action at this time.
0 commit comments