Я запускаю подсказку в примере приложения, предоставленном Google:
Код: Выделить всё
TASK: Extract entities from the input text into a single JSON object.
DEFINITIONS:
- fname: First name of the person.
- lname: Last name of the person.
- email: A valid email address.
- country: Name of a country.
- company: Name of a company.
- position: Job role or title.
RULES:
1. Respond ONLY with the JSON object. DO NOT include any introductory text, markdown fences (like ```json), or explanations.
2. If a value is NOT present in the input, the value MUST be 'null'.
3. The ONLY ALLOWED keys for the JSON are the following: ${updatedParams.joinToString(" ") { it.key }}.
INPUT TEXT: John Doe CEO Google Amazon Partner
Конфигурация 1
Код: Выделить всё
1. Temp = 0.8f
2. TopK = 16
3. MaxOutputTokens = 256
Код: Выделить всё
1. Temp = 0.0f
2. TopK = 1
3. MaxOutputTokens = 2560
Код: Выделить всё
{
"fname": "John",
"lname": "Doe",
"email": null,
"country": null,
"company": "Google",
"position": "CEO"
}
Если я изменю текст ввода на
"San Francisco, SS 9449 944 S Charcoal St. #999 Google www.google.com johndoe@google.com +1 415 602 3847 Генеральный директор Джон Доу"
При каждом запуске с кодом 11 произойдет сбой ошибка.
Если я закрою приложение, очистю кеш приложений и перезагрузлюсь, устройство поможет получить ожидаемый json, но это не должен быть ожидаемый поток событий.
Устройство: Pixel 9
Android 16
Могу ли я получить помощь в понимании того, как правильно построить приглашение, или этот вариант использования даже невозможен?
Подробнее здесь: https://stackoverflow.com/questions/797 ... on-android
Мобильная версия