update knowledge_kb (#34)

* update typescript

* add chunk api

* remove useless code
This commit is contained in:
yqj123
2024-01-18 18:27:38 +08:00
committed by GitHub
parent 9bf75d4511
commit fad2ec7cf3
59 changed files with 1018 additions and 1848 deletions

View File

@@ -1,19 +1,15 @@
import React, { FC } from 'react';
import { IndexModelState, ConnectProps, Loading, connect } from 'umi';
import React from 'react';
import { connect, Dispatch } from 'umi';
import type { chatModelState } from './model'
interface PageProps extends ConnectProps {
index: IndexModelState;
loading: boolean;
interface chatProps {
chatModel: chatModelState;
dispatch: Dispatch
}
const IndexPage: FC<PageProps> = ({ index, dispatch }) => {
const { name } = index;
return <div>chat: {name}</div>;
const View: React.FC<chatProps> = ({ chatModel, dispatch }) => {
const { name } = chatModel;
return <div>chat:{name} </div>;
};
export default connect(
({ index, loading }: { index: IndexModelState; loading: Loading }) => ({
index,
loading: loading.models.index,
}),
)(IndexPage);
export default connect(({ chatModel, loading }) => ({ chatModel, loading }))(View);