zhiwen0905 commited on
Commit
d31bd9a
·
1 Parent(s): 7188024

bugfix(update_api): update api according to llm model changes

Browse files
Brain/src/rising_plugin/llm/llms.py CHANGED
@@ -30,7 +30,7 @@ If user said that compose, write, or create an sms message, please answer belowi
30
  If user said that search contact with its description such as display name or phone number, please answer belowing json format. {"program": "contact", "content": "description of the contact that user is going to search"}
31
  If user said that open a tab, go to a tab, or open a page, please answer belowing json format. {"program": "opentab", "content": ""}
32
  If user said that open a tab and search, go to a tab and search, or open a page and search, please answer belowing json format. {"program": "opentabsearch", "content": "keyword that user is going to search"}
33
- If user said that close a tab, please answer belowing json format. {"program": "close_tab", "content": ""}
34
  If user said that launch a browser or open a browser, please answer belowing json format. {"program": "browser", "content": "https://google.com"}
35
  If user said that go to a previous page, or open a previous page, please answer belowing json format. {"program": "previouspage", "content": ""}
36
  If user said that go to a next page, or open a next page, please answer belowing json format. {"program": "nextpage", "content": ""}
 
30
  If user said that search contact with its description such as display name or phone number, please answer belowing json format. {"program": "contact", "content": "description of the contact that user is going to search"}
31
  If user said that open a tab, go to a tab, or open a page, please answer belowing json format. {"program": "opentab", "content": ""}
32
  If user said that open a tab and search, go to a tab and search, or open a page and search, please answer belowing json format. {"program": "opentabsearch", "content": "keyword that user is going to search"}
33
+ If user said that close a tab, please answer belowing json format. {"program": "closetab", "content": ""}
34
  If user said that launch a browser or open a browser, please answer belowing json format. {"program": "browser", "content": "https://google.com"}
35
  If user said that go to a previous page, or open a previous page, please answer belowing json format. {"program": "previouspage", "content": ""}
36
  If user said that go to a next page, or open a next page, please answer belowing json format. {"program": "nextpage", "content": ""}
Extension/src/pages/Panel/Panel.jsx CHANGED
@@ -112,19 +112,19 @@ const Panel = () => {
112
  addMessage(data.result.content, false)
113
  window.location.assign(data.result.content)
114
  break
115
- case 'open_tab':
116
  addMessage("open tab", false)
117
  window.open('https://google.com/search?q=', '_blank', 'noreferrer')
118
  break
119
- case 'open_tab_search':
120
  addMessage("open tab and search", false)
121
  window.open('https://google.com/search?q=' + data.result.content, '_blank', 'noreferrer')
122
  break
123
- case 'close_tab':
124
  addMessage("close tab", false)
125
  window.close()
126
  break
127
- case 'previous_page':
128
  if (page === 0) {
129
  page = 0
130
  } else {
@@ -134,36 +134,36 @@ const Panel = () => {
134
  addMessage("go to previous page", false)
135
  window.location.assign(currentUrl + '&start=' + page)
136
  break
137
- case 'next_page':
138
  page += 10
139
 
140
  addMessage("go to next page", false)
141
  window.location.assign(currentUrl + '&start=' + page)
142
  break
143
- case 'scroll_up':
144
  addMessage("scroll up", false)
145
  window.scrollBy(0, -300)
146
  break
147
- case 'scroll_down':
148
  addMessage("scroll down", false)
149
  window.scrollBy(0, 300)
150
  break
151
- case 'scroll_top':
152
  addMessage("scroll to top", false)
153
  window.scrollTo(0, 0)
154
  break
155
- case 'scroll_bottom':
156
  addMessage("scroll to bottom", false)
157
  window.scrollTo(0, document.body.scrollHeight)
158
  break
159
  case 'message':
160
  addMessage(data.result.content, false)
161
  break
162
- case 'select_item_detail_info':
163
  addMessage("I need more detail info to select item", false)
164
  selectItem()
165
  break
166
- case 'ask_website':
167
  askAboutCurrentWebsite()
168
  break
169
  default:
 
112
  addMessage(data.result.content, false)
113
  window.location.assign(data.result.content)
114
  break
115
+ case 'opentab':
116
  addMessage("open tab", false)
117
  window.open('https://google.com/search?q=', '_blank', 'noreferrer')
118
  break
119
+ case 'opentabsearch':
120
  addMessage("open tab and search", false)
121
  window.open('https://google.com/search?q=' + data.result.content, '_blank', 'noreferrer')
122
  break
123
+ case 'closetab':
124
  addMessage("close tab", false)
125
  window.close()
126
  break
127
+ case 'previouspage':
128
  if (page === 0) {
129
  page = 0
130
  } else {
 
134
  addMessage("go to previous page", false)
135
  window.location.assign(currentUrl + '&start=' + page)
136
  break
137
+ case 'nextpage':
138
  page += 10
139
 
140
  addMessage("go to next page", false)
141
  window.location.assign(currentUrl + '&start=' + page)
142
  break
143
+ case 'scrollup':
144
  addMessage("scroll up", false)
145
  window.scrollBy(0, -300)
146
  break
147
+ case 'scrolldown':
148
  addMessage("scroll down", false)
149
  window.scrollBy(0, 300)
150
  break
151
+ case 'scrolltop':
152
  addMessage("scroll to top", false)
153
  window.scrollTo(0, 0)
154
  break
155
+ case 'scrollbottom':
156
  addMessage("scroll to bottom", false)
157
  window.scrollTo(0, document.body.scrollHeight)
158
  break
159
  case 'message':
160
  addMessage(data.result.content, false)
161
  break
162
+ case 'selectitemdetailinfo':
163
  addMessage("I need more detail info to select item", false)
164
  selectItem()
165
  break
166
+ case 'askwebsite':
167
  askAboutCurrentWebsite()
168
  break
169
  default: