Skip to content

feat(mlkit): use ML Kit GenAI beta3 API in GenaiPrompt#222

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_948874190
Open

feat(mlkit): use ML Kit GenAI beta3 API in GenaiPrompt#222
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_948874190

Conversation

@copybara-service

Copy link
Copy Markdown

feat(mlkit): use ML Kit GenAI beta3 API in GenaiPrompt

Upgrade GenaiPrompt to genai-prompt 1.0.0-beta3 and use its newer request API:

  • Map each turn to a Content so all images are sent, not just the first.
  • For multi-turn requests, prefix each turn's text with a [role]: marker and
    add a default system instruction so the model does not echo the marker back.
  • Pass the system instruction via the SystemInstruction field.

Upgrade GenaiPrompt to genai-prompt 1.0.0-beta3 and use its newer request API:
- Map each turn to a Content so all images are sent, not just the first.
- For multi-turn requests, prefix each turn's text with a `[role]:` marker and
  add a default system instruction so the model does not echo the marker back.
- Pass the system instruction via the SystemInstruction field.

PiperOrigin-RevId: 948874190
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant