Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AitorAlgorta committed Jan 8, 2024
1 parent 39d5852 commit cc919ea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {useTranslation} from 'react-i18next';
import {HttpClientInstance} from '../../../httpClient';
import styles from './index.module.scss';
import {NotificationModel} from 'model';
import {set} from 'lodash-es';

type EmptyStateProps = {
item: {name: string; topic: string; status: string; lag: number};
Expand Down
4 changes: 3 additions & 1 deletion frontend/control-center/src/pages/LLMConsumers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ const LLMConsumers = (props: LLMConsumersProps) => {
</div>
<div>
{consumers &&
consumers.map((consumer: any) => <LLMConsumerItem item={consumer} setNotification={setNotification} />)}
consumers.map((consumer: any) => (
<LLMConsumerItem key={consumer.topic} item={consumer} setNotification={setNotification} />
))}
</div>
{notification?.show && (
<NotificationComponent
Expand Down
12 changes: 6 additions & 6 deletions frontend/control-center/src/pages/LLMs/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {useEffect, useState} from 'react';
import {NotificationComponent} from 'components';
import {useTranslation} from 'react-i18next';
import {connect, ConnectedProps} from 'react-redux';
import {connect} from 'react-redux';
import {setPageTitle} from '../../services/pageTitle';
import {NotificationModel} from 'model';
import {AiryLoader} from 'components/loaders/AiryLoader';
Expand All @@ -11,13 +11,11 @@ import {HttpClientInstance} from '../../httpClient';
import {LLMSStatsPayload} from 'httpclient/src';
import {LLMInfoItem} from './LLMInfoItem';

type LLMsProps = {} & ConnectedProps<typeof connector>;

const mapDispatchToProps = {};

const connector = connect(null, mapDispatchToProps);

const LLMs = (props: LLMsProps) => {
const LLMs = () => {
const [llms, setLlms] = useState([]);
const [embeddings, setEmbeddings] = useState(0);
const [notification, setNotification] = useState<NotificationModel>(null);
Expand Down Expand Up @@ -50,7 +48,9 @@ const LLMs = (props: LLMsProps) => {
setNotification({show: show, successful: false, text: t('errorOccurred')});
};

const createNewLLM = () => {};
const createNewLLM = () => {
console.log('create new LLM');
};

return (
<>
Expand All @@ -71,7 +71,7 @@ const LLMs = (props: LLMsProps) => {
<h2>Vector Database</h2>
<h2>Model</h2>
</div>
<div>{llms && llms.map((llm: any) => <LLMInfoItem item={llm} />)}</div>
<div>{llms && llms.map((llm: any) => <LLMInfoItem key={llm.llm} item={llm} />)}</div>
<div className={styles.embeddingsSection}>Embeddings: {embeddings}</div>
{notification?.show && (
<NotificationComponent
Expand Down

0 comments on commit cc919ea

Please sign in to comment.