Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Models fixes #1118

Merged
merged 3 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion gui/pages/Content/Agents/AgentCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,11 @@ export default function AgentCreate({
return false;
}

const openModelMarket = () => {
openNewTab(-4, "Marketplace", "Marketplace", false);
localStorage.setItem('marketplace_tab', 'market_models');
}

return (<>
<div className="row" style={{overflowY: 'scroll', height: 'calc(100vh - 92px)'}}>
<div className="col-3"></div>
Expand Down Expand Up @@ -954,7 +959,7 @@ export default function AgentCreate({
))}
</div>
<div className="vertical_containers sticky_option">
<div onClick={() => openNewTab(-4, "Marketplace", "Marketplace", false)} className="custom_select_option horizontal_container mxw_100 padding_12_14 gap_6 bt_white">
<div onClick={() => openModelMarket()} className="custom_select_option horizontal_container mxw_100 padding_12_14 gap_6 bt_white">
<Image width={16} height={16} src="/images/marketplace_logo.png" alt="marketplace_logo" />
<span>Browse models from marketplace</span>
</div>
Expand Down
8 changes: 8 additions & 0 deletions gui/pages/Content/Models/AddModelMarketPlace.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ export default function AddModelMarketPlace(template){
const [templateData, setTemplateData] = useState(template.template);
const [isLoading, setIsLoading] = useState(false);
const [providerId, setProviderId] = useState(1);
const [disableInstall, setDisableInstall] = useState(false);

useEffect(() => {
if(modelVersion === '' && modelEndpoint === '')
setDisableInstall(true)
else
setDisableInstall(false)
},[modelVersion, modelEndpoint])

useEffect(()=>{
console.log(templateData)
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Content/Models/ModelForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default function ModelForm({internalId, getModels, sendModelData}){
<div className="mt_24">
<span>Token Limit</span>
<input className="input_medium mt_8" type="number" placeholder="Enter Model Token Limit" value={modelTokenLimit}
onChange={(event) => setModelTokenLimit(+event.target.value)}/>
onChange={(event) => setModelTokenLimit(parseInt(event.target.value, 10))}/>
</div>

<div className="horizontal_container justify_end mt_24">
Expand Down
8 changes: 4 additions & 4 deletions gui/pages/Dashboard/Settings/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ export default function Settings({organisationId, sendDatabaseData}) {
<Image width={14} height={14} src="/images/database.svg" alt="database-icon"/>
<span>Database</span>
</button>
<button onClick={() => switchTab('apikeys')} className={`${styles.tab_button} ${activeTab === 'apikeys' ? styles.settings_tab_button_clicked : styles.settings_tab_button}`}>
<Image className={styles.settings_tab_img} width={14} height={14} src="/images/key_white.svg"
alt="database-icon"/>&nbsp;API Keys
</button>
<button onClick={() => switchTab('apikeys')} className={activeTab === 'apikeys' ? 'tab_button_selected' : 'tab_button'}>
<Image width={14} height={14} src="/images/key_white.svg" alt="api-key-icon"/>
<span>API Keys</span>
</button>
</div>
</div>
<div>
Expand Down
Binary file added gui/public/images/google_analytics_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion gui/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ const toolkitData = {
'Instagram Toolkit': '/images/instagram.png',
'Knowledge Search Toolkit': '/images/knowledeg_logo.png',
'Notion Toolkit': '/images/notion_logo.png',
'ApolloToolkit': '/images/apollo_logo.png'
'ApolloToolkit': '/images/apollo_logo.png',
'Google Analytics Toolkit': '/images/google_analytics_logo.png'
};

export const getUserTimezone = () => {
Expand Down