Skip to content

Commit

Permalink
Java Shim now correctly passes prompt through (#53)
Browse files Browse the repository at this point in the history
Co-authored-by: David Motsonashvili <[email protected]>
  • Loading branch information
davidmotson and David Motsonashvili authored Feb 9, 2024
1 parent 5911028 commit dc21ffd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .changes/crowd-comfort-color-burst.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type":"PATCH","changes":["GenerativeModelFutures now correctly passes the prompt through"]}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ abstract class GenerativeModelFutures internal constructor() {
SuspendToFutureAdapter.launchFuture { model.generateContent(*prompt) }

override fun generateContentStream(vararg prompt: Content): Publisher<GenerateContentResponse> =
model.generateContentStream().asPublisher()
model.generateContentStream(*prompt).asPublisher()

override fun countTokens(vararg prompt: Content): ListenableFuture<CountTokensResponse> =
SuspendToFutureAdapter.launchFuture { model.countTokens(*prompt) }
Expand Down

0 comments on commit dc21ffd

Please sign in to comment.