123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282 |
- // TODO: don't know why zod can not generate the same schema, need to fix it
- export const geminiNavigatorOutputSchema = {
- type: 'object',
- properties: {
- current_state: {
- type: 'object',
- description: 'Current state of the agent',
- properties: {
- evaluation_previous_goal: {
- type: 'string',
- },
- memory: {
- type: 'string',
- },
- next_goal: {
- type: 'string',
- },
- },
- required: ['evaluation_previous_goal', 'memory', 'next_goal'],
- },
- action: {
- type: 'array',
- items: {
- type: 'object',
- properties: {
- done: {
- type: 'object',
- properties: {
- text: {
- type: 'string',
- },
- success: {
- type: 'boolean',
- },
- },
- required: ['text', 'success'],
- nullable: true,
- },
- search_google: {
- type: 'object',
- properties: {
- intent: {
- type: 'string',
- description: 'purpose of this action',
- },
- query: {
- type: 'string',
- },
- },
- required: ['intent', 'query'],
- nullable: true,
- },
- go_to_url: {
- type: 'object',
- properties: {
- intent: {
- type: 'string',
- description: 'purpose of this action',
- },
- url: {
- type: 'string',
- },
- },
- required: ['intent', 'url'],
- nullable: true,
- },
- go_back: {
- type: 'object',
- properties: {
- intent: {
- type: 'string',
- description: 'purpose of this action',
- },
- },
- required: ['intent'],
- nullable: true,
- },
- wait: {
- type: 'object',
- properties: {
- intent: {
- type: 'string',
- description: 'purpose of this action',
- },
- seconds: {
- type: 'integer',
- },
- },
- required: ['intent', 'seconds'],
- nullable: true,
- },
- click_element: {
- type: 'object',
- properties: {
- intent: {
- type: 'string',
- description: 'purpose of this action',
- },
- index: {
- type: 'integer',
- },
- xpath: {
- type: 'string',
- nullable: true,
- },
- },
- required: ['intent', 'index'],
- nullable: true,
- },
- input_text: {
- type: 'object',
- properties: {
- intent: {
- type: 'string',
- description: 'purpose of this action',
- },
- index: {
- type: 'integer',
- },
- text: {
- type: 'string',
- },
- xpath: {
- type: 'string',
- nullable: true,
- },
- },
- required: ['intent', 'index', 'text'],
- nullable: true,
- },
- switch_tab: {
- type: 'object',
- properties: {
- intent: {
- type: 'string',
- description: 'purpose of this action',
- },
- tab_id: {
- type: 'integer',
- },
- },
- required: ['intent', 'tab_id'],
- nullable: true,
- },
- open_tab: {
- type: 'object',
- properties: {
- intent: {
- type: 'string',
- description: 'purpose of this action',
- },
- url: {
- type: 'string',
- },
- },
- required: ['intent', 'url'],
- nullable: true,
- },
- close_tab: {
- type: 'object',
- properties: {
- intent: {
- type: 'string',
- description: 'purpose of this action',
- },
- tab_id: {
- type: 'integer',
- },
- },
- required: ['intent', 'tab_id'],
- nullable: true,
- },
- cache_content: {
- type: 'object',
- properties: {
- intent: {
- type: 'string',
- description: 'purpose of this action',
- },
- content: {
- type: 'string',
- },
- },
- required: ['intent', 'content'],
- nullable: true,
- },
- scroll_down: {
- type: 'object',
- properties: {
- intent: {
- type: 'string',
- description: 'purpose of this action',
- },
- amount: {
- type: 'integer',
- nullable: true,
- },
- },
- required: ['intent', 'amount'],
- nullable: true,
- },
- scroll_up: {
- type: 'object',
- properties: {
- intent: {
- type: 'string',
- description: 'purpose of this action',
- },
- amount: {
- type: 'integer',
- nullable: true,
- },
- },
- required: ['intent', 'amount'],
- nullable: true,
- },
- send_keys: {
- type: 'object',
- properties: {
- intent: {
- type: 'string',
- description: 'purpose of this action',
- },
- keys: {
- type: 'string',
- },
- },
- required: ['intent', 'keys'],
- nullable: true,
- },
- scroll_to_text: {
- type: 'object',
- properties: {
- intent: {
- type: 'string',
- description: 'purpose of this action',
- },
- text: {
- type: 'string',
- },
- },
- required: ['intent', 'text'],
- nullable: true,
- },
- get_dropdown_options: {
- type: 'object',
- properties: {
- intent: {
- type: 'string',
- description: 'purpose of this action',
- },
- index: {
- type: 'integer',
- },
- },
- required: ['intent', 'index'],
- nullable: true,
- },
- select_dropdown_option: {
- type: 'object',
- properties: {
- intent: {
- type: 'string',
- description: 'purpose of this action',
- },
- index: {
- type: 'integer',
- },
- text: {
- type: 'string',
- },
- },
- required: ['intent', 'index', 'text'],
- nullable: true,
- },
- },
- required: [],
- },
- },
- },
- required: ['current_state', 'action'],
- };
|