|
1 | | -import React, { FunctionComponent, useEffect, useState } from "react" |
2 | | -import Constants from "../../constants" |
3 | | -import eventService from "../../events/eventService" |
| 1 | +import React, { FunctionComponent, useEffect, useState } from 'react' |
| 2 | +import Constants from '../../constants' |
| 3 | +import eventService from '../../events/eventService' |
4 | 4 |
|
5 | 5 | const ModelOptions = [ |
6 | 6 | { value: "gpt-4-32k-0314" }, |
@@ -64,33 +64,37 @@ const AdvancedSettings: FunctionComponent<{}> = () => { |
64 | 64 | <div className="buttons has-addons"> |
65 | 65 | <div className="field has-addons"> |
66 | 66 | <p className="control is-expanded"> |
67 | | - <input className="input" type="text" value={openAIKey} |
68 | | - onChange={(e: React.ChangeEvent<HTMLInputElement>) => { setOpenAIKey(e.target.value) }} placeholder="Enter API key" /> |
| 67 | + <input |
| 68 | + className="input" |
| 69 | + type="text" |
| 70 | + value={openAIKey} |
| 71 | + onChange={(e: React.ChangeEvent<HTMLInputElement>) => { setOpenAIKey(e.target.value) }} |
| 72 | + placeholder="Enter API key" /> |
69 | 73 | </p> |
70 | | - <p id="api_key_update" className="control"> |
71 | | - <a className="button" onClick={() => { updateOpenAIKey() }}> |
| 74 | + <p className="control"> |
| 75 | + <a className="button" onClick={updateOpenAIKey}> |
72 | 76 | <i className="fas fa-check" /> |
73 | 77 | </a> |
74 | 78 | </p> |
75 | 79 | </div> |
76 | 80 | </div> |
77 | 81 | <h2>OpenAI Model</h2> |
78 | 82 | <p>Update OpenAI Model to enable Generate SQL tool.</p> |
79 | | - <div className="buttons has-addons"> |
80 | | - <div className="field has-addons"> |
81 | | - <div className="select"> |
82 | | - <select value={openAIModel} onChange={(e) => {handleModelChange(e)}}> |
83 | | - {ModelOptions.map((e,idx)=>{ |
84 | | - return <option value={e.value} key={idx}> {e.value} </option> |
85 | | - })} |
| 83 | + <div className="field has-addons"> |
| 84 | + <p className="control"> |
| 85 | + <span className="select"> |
| 86 | + <select value={openAIModel} onChange={e => handleModelChange(e)}> |
| 87 | + {ModelOptions.map((e, idx) => { |
| 88 | + return <option value={e.value} key={idx}> {e.value} </option> |
| 89 | + })} |
86 | 90 | </select> |
87 | | - </div> |
88 | | - <p id="model_update" className="control"> |
89 | | - <a className="button" onClick={() => updateOpenAIModel()}> |
90 | | - <i className="fas fa-check" /> |
91 | | - </a> |
92 | | - </p> |
93 | | - </div> |
| 91 | + </span> |
| 92 | + </p> |
| 93 | + <p className="control"> |
| 94 | + <button className="button" onClick={() => updateOpenAIModel()}> |
| 95 | + <i className="fas fa-check" /> |
| 96 | + </button> |
| 97 | + </p> |
94 | 98 | </div> |
95 | 99 | <br /> |
96 | 100 | </React.Fragment> |
|
0 commit comments