[Bug][api][java][python] A text prompt on a chat model setup is a user message in Java but a system message in Python
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- ai, backend-api-design
Direzione di ricerca
Read BaseChatModelSetup.java around line 253 and chat_model.py around line 575, then check the prompt formatting APIs and existing cross-language tests. The issue leaves the intended message role undecided, so first determine the project’s expected behavior with maintainers; done means Java and Python setups send the same role and a cross-language test covers it.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Search before asking
- I searched in the issues and found nothing similar.
Description
A text prompt (Prompt.from_text / Prompt.fromText) set as a chat model setup's prompt becomes a different message role in each language:
- Java:
BaseChatModelSetuprenders it withprompt.formatMessages(MessageRole.USER, ...)(BaseChatModelSetup.java:253), so it is sent as a user message. - Python:
BaseChatModelSetupcallsself._get_prompt().format_messages(**str_prompt_args)(chat_model.py:575), which uses the defaultMessageRole.SYSTEM, so it is sent as a system message.
The same agent, declared in Java, Python or YAML, therefore sends a different conversation to the model depending on the language that runs the setup. The docs don't say which role a text prompt takes. Messages prompts are not affected, since each message carries its own role.
Which role is intended? I'm happy to align the other side, plus a cross-language test, once that's settled.
How to reproduce
Bind Prompt.from_text("Summarize {text}") / Prompt.fromText("Summarize {text}") to a chat model setup in each language and inspect the messages sent to the model: Java sends user: Summarize ..., Python sends system: Summarize ....
Version and environment
main at 0f83f4b9, Java 17 / Python 3.11, macOS.
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Lingua principale
- Java
- Stelle
- 497
- Fork
- 193
- Merge medio
- 2g 21h
- PR unite (30g)
- 68
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/flink-agents
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
apache/flink-agents#1480 ·
I maintainer di solito rispondono entro 2 giorni
-
[Tech Debt] Python cross-language e2e tests hardcode 0.4-SNAPSHOT tests jar and silently skipAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
apache/flink-agents#1476 ·
I maintainer di solito rispondono entro 2 giorni
-
[Bug][runtime] Trace Log loggers fail on a string trace-log.pretty-print valueForse già presa @Zhuoxi2000 l’ha presa 3 giorni fa. ApertaaffectVersion/0.4.0 bug fixVersion/0.4.1 fixVersion/1.0.0 priority/major
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/flink-agents#1463 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
[java][python][Azure OpenAI] Align token limit handling with max_completion_tokensForse già presa @samarthputhraya l’ha presa oggi. ApertaaffectVersion/0.4.0 bug priority/major
apache/flink-agents#1478 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
java priority/minor tech debt
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
apache/flink-agents#1477 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di apache/flink-agents
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
Card-Forge/forge#13128 ·
I maintainer di solito rispondono entro 1 giorno
-
client documentation
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
ClickHouse/clickhouse-java#3469 ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Beam P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno