zhiwen0905 commited on
Commit
575498e
·
1 Parent(s): 1545f35

feature(#192): updated with confs...

Browse files
Files changed (1) hide show
  1. Extension/src/pages/Panel/Panel.jsx +15 -4
Extension/src/pages/Panel/Panel.jsx CHANGED
@@ -6,7 +6,6 @@ import { getDatabase, onValue, ref } from "firebase/database";
6
  import Message from './Message'
7
  import './Panel.css';
8
  import app from './FirebaseApp/firebase-app'
9
- import * as confs from '../../configs/rising-config.json'
10
 
11
  const {Footer, Content} = Layout;
12
  const URL_BASE = 'https://ttt246-brain.hf.space/'
@@ -16,7 +15,17 @@ const URL_ASK_WEBSITE = URL_BASE + 'browser/ask'
16
  const URL_DELETE_RTD = URL_BASE + 'auto_task/delete'
17
 
18
  let prompt = ""
19
-
 
 
 
 
 
 
 
 
 
 
20
  const Panel = () => {
21
  const [question, setQuestion] = useState("");
22
  const [messages, setMessages] = useState([]);
@@ -173,7 +182,8 @@ const Panel = () => {
173
  }
174
  sendRequest(params, URL_BROWSER_ITEM).then(data => {
175
  window.open(data.result.content, '_blank', 'noreferrer')
176
- }).catch(err => {
 
177
  })
178
  }
179
 
@@ -185,7 +195,8 @@ const Panel = () => {
185
  }
186
  sendRequest(params, URL_ASK_WEBSITE).then(data => {
187
  addMessage(data.result.content, false)
188
- }).catch(err => {
 
189
  })
190
  }
191
 
 
6
  import Message from './Message'
7
  import './Panel.css';
8
  import app from './FirebaseApp/firebase-app'
 
9
 
10
  const {Footer, Content} = Layout;
11
  const URL_BASE = 'https://ttt246-brain.hf.space/'
 
15
  const URL_DELETE_RTD = URL_BASE + 'auto_task/delete'
16
 
17
  let prompt = ""
18
+ const confs = {
19
+ "openai_key": "",
20
+ "pinecone_key": "",
21
+ "pinecone_env": "",
22
+ "firebase_key": "",
23
+ "token": "",
24
+ "uuid": "extension-uuid",
25
+ "settings": {
26
+ "temperature": 0.6
27
+ }
28
+ }
29
  const Panel = () => {
30
  const [question, setQuestion] = useState("");
31
  const [messages, setMessages] = useState([]);
 
182
  }
183
  sendRequest(params, URL_BROWSER_ITEM).then(data => {
184
  window.open(data.result.content, '_blank', 'noreferrer')
185
+ }).catch(err => {
186
+ console.error((err))
187
  })
188
  }
189
 
 
195
  }
196
  sendRequest(params, URL_ASK_WEBSITE).then(data => {
197
  addMessage(data.result.content, false)
198
+ }).catch(err => {
199
+ console.error((err))
200
  })
201
  }
202