refactor(android): drop the single-prompt merge once ml kit sends older gemini nano whole conversations

Aperta
#364 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
30/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
android, react-native, typescript
Ambito
ai, mobile-dev

Direzione di ricerca

Start by reading GeminiNano.buildRequest in @react-native-ai/android and the change made in PR #367, then compare it with ADK's NanoSingleTextPrompt reference in #358. The work is blocked until ML Kit or AICore sends older Gemini Nano models the full multi-Content conversation or until those models age out. Done means the single TextPart merge is removed, system instructions and turns are sent separately, and behavior is verified on an affected nano-v2 device such as a Pixel 9 Pro.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Blocked enhancement

Gemini Nano without system prompt support (isSystemPromptAvailable() false, such as nano-v2 on a Pixel 9 Pro with AICore aicore_20260219) reads only the first text part of an ML Kit genai-prompt request. A conversation sent as several Content turns, or with a separate system instruction, gets an answer to the first part only.

@react-native-ai/android (PR #367) therefore merges the system instruction and the text of every turn into one TextPart on those models, with images first, like ADK's NanoSingleTextPrompt (#358). Models with system prompt support get the instruction and turns separately.

genai-agent's AgentSession is no alternative: it rebuilds the same multi-Content request.

Remove the merge in GeminiNano.buildRequest once ML Kit or AICore sends older Gemini Nano the whole conversation (or those models age out).

Lingua principale
TypeScript
Stelle
1.4k
Fork
64
Merge medio
11h 24m
PR unite (30g)
91

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di callstackincubator/ai

Tutte le issue di callstackincubator/ai

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.