parent
01214077d3
commit
16e2ac5b6c
@ -0,0 +1,189 @@
|
||||
import Chart from '@/components/echarts/chart';
|
||||
import { grid, title as titleConfig } from '@/components/echarts/config';
|
||||
import EmptyData from '@/components/empty-data';
|
||||
import _ from 'lodash';
|
||||
import { memo, useCallback, useMemo, useRef } from 'react';
|
||||
import { ChartProps } from './types';
|
||||
|
||||
const options: any = {
|
||||
animation: false,
|
||||
grid: {
|
||||
...grid,
|
||||
right: -1,
|
||||
top: -1,
|
||||
bottom: -1,
|
||||
left: -1,
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
slient: true,
|
||||
splitNumber: 15,
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: 'rgba(5,5,5,0.06)'
|
||||
}
|
||||
},
|
||||
axisLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
slient: true,
|
||||
splitNumber: 10,
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: 'rgba(5,5,5,0.06)'
|
||||
}
|
||||
},
|
||||
axisLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
symbol: 'roundRect',
|
||||
label: {
|
||||
show: true,
|
||||
shadowColor: 'none',
|
||||
textBorderColor: 'none',
|
||||
formatter: (params: any) => {
|
||||
return params.name;
|
||||
}
|
||||
},
|
||||
series: []
|
||||
};
|
||||
|
||||
const Scatter: React.FC<ChartProps> = (props) => {
|
||||
const {
|
||||
seriesData,
|
||||
xAxisData,
|
||||
height,
|
||||
width,
|
||||
showEmpty,
|
||||
labelFormatter,
|
||||
legendData,
|
||||
title
|
||||
} = props;
|
||||
|
||||
const chart = useRef<any>(null);
|
||||
|
||||
const findOverlappingPoints = useCallback(
|
||||
(data: any[], currentPoint: any) => {
|
||||
const overlappingPoints = [];
|
||||
const symbolRadius = 16;
|
||||
|
||||
const [x1, y1] = chart.current.chart?.convertToPixel(
|
||||
'grid',
|
||||
currentPoint.value
|
||||
);
|
||||
|
||||
const pixelPoints = data.map((point) => {
|
||||
return {
|
||||
...point,
|
||||
value: chart.current.chart?.convertToPixel('grid', point.value)
|
||||
};
|
||||
});
|
||||
|
||||
for (let j = 0; j < pixelPoints.length; j++) {
|
||||
if (currentPoint.name === pixelPoints[j].name) {
|
||||
overlappingPoints.push({ ...pixelPoints[j] });
|
||||
continue;
|
||||
}
|
||||
const [x2, y2] = pixelPoints[j].value;
|
||||
|
||||
const distance = Math.sqrt(
|
||||
Math.pow(_.round(x2 - x1, 2), 2) + Math.pow(_.round(y2 - y1, 2), 2)
|
||||
);
|
||||
|
||||
if (distance <= symbolRadius) {
|
||||
overlappingPoints.push({ ...pixelPoints[j] });
|
||||
}
|
||||
}
|
||||
|
||||
return overlappingPoints;
|
||||
},
|
||||
[]
|
||||
);
|
||||
|
||||
const dataOptions = useMemo((): any => {
|
||||
if (!seriesData.length) {
|
||||
options.xAxis.min = 0;
|
||||
options.xAxis.max = 1;
|
||||
options.yAxis.min = 0;
|
||||
options.yAxis.max = 1;
|
||||
} else {
|
||||
options.xAxis.min = null;
|
||||
options.xAxis.max = null;
|
||||
options.yAxis.min = null;
|
||||
options.yAxis.max = null;
|
||||
}
|
||||
const seriseDataList = seriesData.map((item: any, index: number) => {
|
||||
return {
|
||||
...item,
|
||||
itemStyle: {
|
||||
color: '#5470c6'
|
||||
},
|
||||
symbolSize: 16
|
||||
};
|
||||
});
|
||||
return {
|
||||
...options,
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
borderWidth: 0,
|
||||
formatter(params: any, callback?: (val: any) => any) {
|
||||
const dataList = findOverlappingPoints(seriseDataList, params.data);
|
||||
let result = '';
|
||||
dataList.forEach((item: any) => {
|
||||
result += `
|
||||
<span class="tooltip-item" style="justify-content: flex-start;">
|
||||
<span class="tooltip-item-name">
|
||||
<span style="display:flex;justify-content:center;align-items: center;color:#fff;
|
||||
margin-right:0;border-radius:4px;width:14px;
|
||||
height:14px;background-color:${item.itemStyle?.color};"
|
||||
>${item.name}</span>
|
||||
</span>
|
||||
<span class="tooltip-value">${item.text}</span>
|
||||
</span>`;
|
||||
});
|
||||
return `<div class="tooltip-wrapper">${result}</div>`;
|
||||
}
|
||||
},
|
||||
title: {
|
||||
...titleConfig,
|
||||
text: title
|
||||
},
|
||||
series: {
|
||||
type: 'scatter',
|
||||
data: seriseDataList
|
||||
}
|
||||
};
|
||||
}, [seriesData, xAxisData, title, findOverlappingPoints]);
|
||||
|
||||
return (
|
||||
<>
|
||||
{!seriesData.length && showEmpty ? (
|
||||
<EmptyData height={height} title={title}></EmptyData>
|
||||
) : (
|
||||
<Chart
|
||||
ref={chart}
|
||||
height={height}
|
||||
options={dataOptions}
|
||||
width={width || '100%'}
|
||||
></Chart>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(Scatter);
|
||||
@ -0,0 +1,442 @@
|
||||
import ScatterChart from '@/components/echarts/scatter';
|
||||
import useOverlayScroller from '@/hooks/use-overlay-scroller';
|
||||
import useRequestToken from '@/hooks/use-request-token';
|
||||
import {
|
||||
ClearOutlined,
|
||||
LoadingOutlined,
|
||||
PlusOutlined,
|
||||
ThunderboltOutlined,
|
||||
UploadOutlined
|
||||
} from '@ant-design/icons';
|
||||
import { useIntl, useSearchParams } from '@umijs/max';
|
||||
import { Button, Tooltip } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import 'overlayscrollbars/overlayscrollbars.css';
|
||||
import {
|
||||
forwardRef,
|
||||
memo,
|
||||
useEffect,
|
||||
useImperativeHandle,
|
||||
useMemo,
|
||||
useRef,
|
||||
useState
|
||||
} from 'react';
|
||||
import { UMAP } from 'umap-js';
|
||||
import { handleEmbedding } from '../apis';
|
||||
import { MessageItem, ParamsSchema } from '../config/types';
|
||||
import '../style/ground-left.less';
|
||||
import '../style/rerank.less';
|
||||
import '../style/system-message-wrap.less';
|
||||
import FileList from './file-list';
|
||||
import InputList from './input-list';
|
||||
import RerankerParams from './reranker-params';
|
||||
import UploadFile from './upload-file';
|
||||
import ViewCodeModal from './view-code-modal';
|
||||
|
||||
interface MessageProps {
|
||||
modelList: Global.BaseOption<string>[];
|
||||
loaded?: boolean;
|
||||
ref?: any;
|
||||
}
|
||||
|
||||
const paramsConfig: ParamsSchema[] = [
|
||||
{
|
||||
type: 'Select',
|
||||
name: 'truncate',
|
||||
label: {
|
||||
text: 'Truncate',
|
||||
isLocalized: false
|
||||
},
|
||||
options: [
|
||||
{
|
||||
label: 'None',
|
||||
value: 'none'
|
||||
},
|
||||
{
|
||||
label: 'Start',
|
||||
value: 'start'
|
||||
},
|
||||
{
|
||||
label: 'End',
|
||||
value: 'end'
|
||||
}
|
||||
],
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: 'Please select truncate'
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
const initialValues = {
|
||||
truncate: 'none'
|
||||
};
|
||||
|
||||
const GroundReranker: React.FC<MessageProps> = forwardRef((props, ref) => {
|
||||
const { modelList } = props;
|
||||
const acceptType =
|
||||
'.txt, .doc, .docx, .xls, .xlsx, .csv, .md, .pdf, .eml, .msg, .ppt, .pptx, .xml, .epub, .html';
|
||||
const messageId = useRef<number>(0);
|
||||
const [messageList, setMessageList] = useState<MessageItem[]>([]);
|
||||
|
||||
const intl = useIntl();
|
||||
const requestSource = useRequestToken();
|
||||
const [searchParams] = useSearchParams();
|
||||
const selectModel = searchParams.get('model') || '';
|
||||
const [parameters, setParams] = useState<any>({});
|
||||
const [show, setShow] = useState(false);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [tokenResult, setTokenResult] = useState<any>(null);
|
||||
const [collapse, setCollapse] = useState(false);
|
||||
const contentRef = useRef<any>('');
|
||||
const scroller = useRef<any>(null);
|
||||
const inputListRef = useRef<any>(null);
|
||||
const paramsRef = useRef<any>(null);
|
||||
const messageListLengthCache = useRef<number>(0);
|
||||
const requestToken = useRef<any>(null);
|
||||
const [fileList, setFileList] = useState<
|
||||
{ text: string; name: string; uid: number | string }[]
|
||||
>([]);
|
||||
|
||||
const [textList, setTextList] = useState<
|
||||
{ text: string; uid: number | string; name: string }[]
|
||||
>([
|
||||
{
|
||||
text: '',
|
||||
uid: -1,
|
||||
name: ''
|
||||
},
|
||||
{
|
||||
text: '',
|
||||
uid: -2,
|
||||
name: ''
|
||||
}
|
||||
]);
|
||||
|
||||
const [scatterData, setScatterData] = useState<any[]>([]);
|
||||
|
||||
const { initialize, updateScrollerPosition } = useOverlayScroller();
|
||||
const {
|
||||
initialize: innitializeParams,
|
||||
updateScrollerPosition: updateDocumentScrollerPosition
|
||||
} = useOverlayScroller();
|
||||
|
||||
useImperativeHandle(ref, () => {
|
||||
return {
|
||||
viewCode() {
|
||||
setShow(true);
|
||||
},
|
||||
setCollapse() {
|
||||
setCollapse(!collapse);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
const inputEmpty = useMemo(() => {
|
||||
const list = [...textList, ...fileList].filter((item) => item.text);
|
||||
return list.length < 2;
|
||||
}, [textList, fileList]);
|
||||
|
||||
const generateEmbedding = (embeddings: any[]) => {
|
||||
try {
|
||||
const umap = new UMAP({
|
||||
// random() {
|
||||
// return 0.1;
|
||||
// },
|
||||
// minDist: 0.1,
|
||||
nComponents: 2,
|
||||
nNeighbors: 1
|
||||
});
|
||||
|
||||
const dataList = embeddings.map((item) => {
|
||||
return item.embedding;
|
||||
});
|
||||
|
||||
const embedding = umap.fit([...dataList, ...dataList]);
|
||||
|
||||
const list = embedding.map((item: number[], index: number) => {
|
||||
return {
|
||||
value: item,
|
||||
name: index + 1,
|
||||
text: `test test test test test`
|
||||
};
|
||||
});
|
||||
setScatterData(list);
|
||||
} catch (e) {
|
||||
// console.log('error:', e);
|
||||
}
|
||||
};
|
||||
|
||||
const setMessageId = () => {
|
||||
messageId.current = messageId.current + 1;
|
||||
};
|
||||
|
||||
const handleStopConversation = () => {
|
||||
requestToken.current?.cancel?.();
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
const submitMessage = async (current?: { role: string; content: string }) => {
|
||||
if (!parameters.model) return;
|
||||
try {
|
||||
setLoading(true);
|
||||
setMessageId();
|
||||
setTokenResult(null);
|
||||
|
||||
requestToken.current?.cancel?.();
|
||||
requestToken.current = requestSource();
|
||||
|
||||
contentRef.current = current?.content || '';
|
||||
|
||||
const result: any = await handleEmbedding(
|
||||
{
|
||||
model: parameters.model,
|
||||
input: [
|
||||
...textList.map((item) => item.text),
|
||||
...fileList.map((item) => item.text)
|
||||
]
|
||||
},
|
||||
{
|
||||
token: requestToken.current.token
|
||||
}
|
||||
);
|
||||
console.log('result:', result);
|
||||
|
||||
setTokenResult(result.usage);
|
||||
|
||||
const embeddingsList = result.data || [];
|
||||
|
||||
console.log('embeddings:', embeddingsList);
|
||||
|
||||
generateEmbedding(embeddingsList);
|
||||
} catch (error: any) {
|
||||
console.log('error========', error);
|
||||
setTokenResult({
|
||||
error: true,
|
||||
errorMessage: error.response?.data?.error?.message
|
||||
});
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
const handleClear = () => {
|
||||
if (!messageList.length) {
|
||||
return;
|
||||
}
|
||||
setMessageId();
|
||||
setScatterData([]);
|
||||
setTokenResult(null);
|
||||
};
|
||||
|
||||
const handleSendMessage = () => {
|
||||
submitMessage();
|
||||
};
|
||||
|
||||
const handleCloseViewCode = () => {
|
||||
setShow(false);
|
||||
};
|
||||
|
||||
const handleUpdateFileList = (
|
||||
files: { text: string; name: string; uid: number | string }[]
|
||||
) => {
|
||||
console.log('files:', files);
|
||||
setFileList((preList) => {
|
||||
return [...preList, ...files];
|
||||
});
|
||||
};
|
||||
|
||||
const handleDeleteFile = (uid: number | string) => {
|
||||
setFileList((preList) => {
|
||||
return preList.filter((item) => item.uid !== uid);
|
||||
});
|
||||
};
|
||||
const handleAddText = () => {
|
||||
inputListRef.current?.handleAdd();
|
||||
};
|
||||
|
||||
const handleTextListChange = (
|
||||
list: { text: string; uid: number | string; name: string }[]
|
||||
) => {
|
||||
setTextList(list);
|
||||
};
|
||||
|
||||
const handleClearDocuments = () => {
|
||||
setTextList([
|
||||
{
|
||||
text: '',
|
||||
uid: -1,
|
||||
name: ''
|
||||
},
|
||||
{
|
||||
text: '',
|
||||
uid: -2,
|
||||
name: ''
|
||||
}
|
||||
]);
|
||||
setFileList([]);
|
||||
setScatterData([]);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
setMessageId();
|
||||
setScatterData([]);
|
||||
setTokenResult(null);
|
||||
}, [parameters.model]);
|
||||
|
||||
useEffect(() => {
|
||||
if (scroller.current) {
|
||||
initialize(scroller.current);
|
||||
}
|
||||
}, [scroller.current, initialize]);
|
||||
|
||||
useEffect(() => {
|
||||
if (paramsRef.current) {
|
||||
innitializeParams(paramsRef.current);
|
||||
}
|
||||
}, [paramsRef.current, innitializeParams]);
|
||||
|
||||
useEffect(() => {
|
||||
updateScrollerPosition();
|
||||
}, [messageList]);
|
||||
|
||||
useEffect(() => {
|
||||
if (textList.length + fileList.length > messageListLengthCache.current) {
|
||||
updateDocumentScrollerPosition();
|
||||
}
|
||||
messageListLengthCache.current = textList.length + fileList.length;
|
||||
}, [textList.length, fileList.length]);
|
||||
|
||||
return (
|
||||
<div className="ground-left-wrapper rerank">
|
||||
<div className="ground-left" style={{ justifyContent: 'flex-start' }}>
|
||||
<div
|
||||
className="center"
|
||||
ref={scroller}
|
||||
style={{ height: 'auto', maxHeight: '100%' }}
|
||||
>
|
||||
<div className="documents">
|
||||
<div className="flex-between m-b-8 doc-header">
|
||||
<h3 className="m-l-10 flex-between flex-center font-size-14 line-24 m-b-0">
|
||||
<span>Documents</span>
|
||||
</h3>
|
||||
<div className="flex gap-10">
|
||||
<UploadFile
|
||||
handleUpdateFileList={handleUpdateFileList}
|
||||
accept={acceptType}
|
||||
>
|
||||
<Tooltip title={<span>Support: {acceptType}</span>}>
|
||||
<Button
|
||||
size="middle"
|
||||
icon={<UploadOutlined></UploadOutlined>}
|
||||
>
|
||||
Upload File
|
||||
</Button>
|
||||
</Tooltip>
|
||||
</UploadFile>
|
||||
<Button size="middle" onClick={handleAddText}>
|
||||
<PlusOutlined />
|
||||
Add Text
|
||||
</Button>
|
||||
<Button
|
||||
icon={<ClearOutlined />}
|
||||
size="middle"
|
||||
onClick={handleClearDocuments}
|
||||
>
|
||||
{intl.formatMessage({ id: 'common.button.clear' })}
|
||||
</Button>
|
||||
<Button
|
||||
size="middle"
|
||||
type="primary"
|
||||
disabled={inputEmpty}
|
||||
onClick={handleSendMessage}
|
||||
>
|
||||
{loading ? <LoadingOutlined /> : <ThunderboltOutlined />}
|
||||
{intl.formatMessage({ id: 'common.button.run' })}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="docs-wrapper">
|
||||
<InputList
|
||||
ref={inputListRef}
|
||||
textList={textList}
|
||||
onChange={handleTextListChange}
|
||||
></InputList>
|
||||
<div style={{ marginTop: 8 }}>
|
||||
<FileList
|
||||
fileList={fileList}
|
||||
textListCount={textList.length || 0}
|
||||
onDelete={handleDeleteFile}
|
||||
></FileList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
className="ground-left-footer"
|
||||
style={{
|
||||
width: '100%',
|
||||
padding: '0 32px 16px'
|
||||
}}
|
||||
>
|
||||
<h3 className="m-l-10 flex-between flex-center font-size-14 line-24 m-b-16">
|
||||
<span>Output</span>
|
||||
</h3>
|
||||
<div
|
||||
style={{
|
||||
border: '1px solid var(--ant-color-border)',
|
||||
borderRadius: 'var(--border-radius-base)',
|
||||
overflow: 'hidden',
|
||||
width: '100%'
|
||||
}}
|
||||
className="scatter"
|
||||
>
|
||||
<ScatterChart
|
||||
seriesData={scatterData}
|
||||
height={160}
|
||||
width="100%"
|
||||
xAxisData={[]}
|
||||
></ScatterChart>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className={classNames('params-wrapper', {
|
||||
collapsed: collapse
|
||||
})}
|
||||
ref={paramsRef}
|
||||
>
|
||||
<div className="box">
|
||||
<RerankerParams
|
||||
setParams={setParams}
|
||||
paramsConfig={paramsConfig}
|
||||
initialValues={initialValues}
|
||||
params={parameters}
|
||||
selectedModel={selectModel}
|
||||
modelList={modelList}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ViewCodeModal
|
||||
open={show}
|
||||
apiType="embedding"
|
||||
payLoad={{
|
||||
input: [
|
||||
...textList.map((item) => item.text),
|
||||
...fileList.map((item) => item.text)
|
||||
].filter((text) => text)
|
||||
}}
|
||||
parameters={{
|
||||
...parameters
|
||||
}}
|
||||
onCancel={handleCloseViewCode}
|
||||
title={intl.formatMessage({ id: 'playground.viewcode' })}
|
||||
></ViewCodeModal>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
export default memo(GroundReranker);
|
||||
@ -0,0 +1,430 @@
|
||||
const data = {
|
||||
id: '6d532ab7-ee33-485a-bda4-cc8bea2c3f3d',
|
||||
texts: ['rtertertterter', 'rtertertterter'],
|
||||
embeddings: [
|
||||
[
|
||||
0.050720215, -0.025253296, 0.018859863, -0.060180664, -0.008003235,
|
||||
0.02192688, -0.020126343, 0.0068893433, 0.040252686, 0.08441162,
|
||||
0.025665283, 0.0036411285, 0.03982544, -0.0021705627, -0.035705566,
|
||||
0.01020813, 0.025894165, 0.018508911, 0.01966858, -0.026672363,
|
||||
0.017089844, -0.010887146, 0.0019197464, 0.009437561, -0.015419006,
|
||||
0.06439209, 0.04019165, -0.015975952, -0.02067566, -0.016555786,
|
||||
-0.0010957718, -0.01838684, 0.045898438, 0.0023231506, -0.022155762,
|
||||
0.011688232, -0.020401001, -0.026412964, -0.02255249, 0.0013628006,
|
||||
-0.026275635, 0.018966675, -0.010017395, -0.049316406, -0.07763672,
|
||||
0.0066070557, -0.039245605, 0.04776001, 0.039733887, -0.019332886,
|
||||
0.0005726814, 0.017242432, 0.0050201416, -0.017471313, -0.015403748,
|
||||
0.02255249, 0.001572609, -0.03491211, 0.02078247, 0.011054993,
|
||||
0.006095886, 0.0012397766, 0.023040771, 0.025466919, 0.027023315,
|
||||
0.035583496, 0.08203125, 0.011604309, 0.022216797, -0.026992798,
|
||||
-0.04067993, -0.0070381165, 0.03677368, -0.02748108, -0.0335083,
|
||||
0.025543213, 0.005680084, 0.0107803345, 0.035949707, -0.04876709,
|
||||
0.095825195, 0.0022659302, 0.07824707, 0.012763977, -0.005420685,
|
||||
0.011138916, 0.029067993, -0.03390503, -0.011413574, -0.013313293,
|
||||
-0.019592285, 0.042510986, -0.042785645, 0.030960083, -0.016403198,
|
||||
0.0018463135, 0.022537231, -0.0011920929, -0.044311523, -0.018127441,
|
||||
0.01953125, -0.029327393, 0.021957397, -0.011230469, 0.0149002075,
|
||||
0.035949707, -0.012054443, 0.070495605, 0.07702637, 0.020904541,
|
||||
0.008781433, 0.049804688, -0.027801514, 0.008415222, -0.030349731,
|
||||
0.02470398, -0.042541504, -0.0023899078, -0.0049552917, -0.0027923584,
|
||||
-0.02558899, 0.025939941, 0.012519836, -0.090270996, -0.0047836304,
|
||||
-0.02619934, -0.017822266, -0.016662598, 0.022766113, 0.012741089,
|
||||
-0.0014429092, 0.040161133, 0.0011053085, -0.019882202, -0.039733887,
|
||||
0.013244629, 0.022369385, 0.032043457, 0.009048462, 0.046539307,
|
||||
0.019546509, -0.03488159, 0.022445679, 0.0027885437, 0.002456665,
|
||||
0.035339355, 0.036834717, -0.018630981, -0.030380249, -0.004989624,
|
||||
-0.042114258, 0.0056419373, 0.016189575, 0.011451721, -0.034851074,
|
||||
-0.0005874634, -0.06793213, 0.0044517517, 0.010971069, 0.006412506,
|
||||
0.014167786, -0.007965088, -0.04449463, -0.029205322, -0.076660156,
|
||||
0.0044059753, 0.047851562, 0.025344849, 0.00012153387, 0.07354736,
|
||||
-0.044189453, 0.043395996, 0.025848389, 0.049072266, -0.0019721985,
|
||||
-0.0046691895, -0.0004079342, 0.006008148, 0.027114868, -0.042541504,
|
||||
-0.04498291, -0.049926758, 0.020126343, -0.0037727356, -0.025283813,
|
||||
0.009117126, -0.027618408, 0.0058937073, 0.068847656, -0.006713867,
|
||||
-0.017364502, -0.026062012, 0.06549072, -0.021942139, 0.0008788109,
|
||||
-0.057128906, -0.023498535, 0.014709473, -0.02331543, -0.0158844,
|
||||
0.008895874, 0.040802002, -0.03564453, -0.00333786, -0.038757324,
|
||||
-0.030136108, -0.0037994385, 0.030578613, -0.012077332, -0.001540184,
|
||||
0.023529053, -0.034606934, -0.02178955, 0.023590088, -0.017700195,
|
||||
-0.04168701, 0.0072021484, -0.018508911, -0.0042686462, -0.046661377,
|
||||
0.03805542, 0.039154053, 0.0031318665, 0.07269287, 0.018325806,
|
||||
0.021957397, -0.02003479, 0.028549194, 0.04058838, 0.03149414,
|
||||
-0.012687683, -0.024353027, 0.01612854, 0.02494812, -0.035095215,
|
||||
0.017822266, 0.021865845, 0.0592041, -0.015838623, -0.0044555664,
|
||||
0.010139465, 0.0021953583, -0.04309082, 0.021942139, -0.005607605,
|
||||
-0.056671143, -0.013801575, 0.03338623, -0.00020134449, 0.09112549,
|
||||
0.022399902, 0.016906738, -0.0017642975, -0.012428284, -0.0362854,
|
||||
0.022735596, 0.013328552, -0.0066070557, -0.033294678, 0.01398468,
|
||||
0.0057754517, 0.005077362, -0.037017822, 0.013420105, 0.08148193,
|
||||
-0.03665161, 0.024368286, -0.0016231537, -0.02973938, 0.0023231506,
|
||||
0.029296875, -0.035705566, -0.00680542, 0.051330566, 0.019592285,
|
||||
-0.042633057, -0.030792236, 0.008384705, 0.0121536255, 0.014945984,
|
||||
-0.009254456, 0.009719849, -0.029510498, -0.02015686, 0.05722046,
|
||||
0.02319336, -0.021194458, -0.050933838, -0.021987915, 0.026473999,
|
||||
0.03729248, 0.043640137, 0.022491455, -0.018341064, 0.029937744,
|
||||
0.004016876, 0.10595703, 0.014282227, 0.0027809143, 0.010871887,
|
||||
0.022613525, 0.049621582, 0.041229248, -0.029891968, -0.003320694,
|
||||
-0.011787415, 0.004383087, 0.016998291, -0.010032654, -0.008041382,
|
||||
-0.03692627, 0.031036377, 0.0129470825, -0.014122009, -0.019683838,
|
||||
-0.05117798, -0.012664795, -0.020492554, -0.06341553, -0.030059814,
|
||||
0.050567627, -0.03253174, -0.010299683, 0.035095215, -0.023651123,
|
||||
-0.011520386, 0.072143555, 0.0026130676, -0.028778076, 0.04336548,
|
||||
0.06500244, 0.049957275, 0.008773804, -0.010055542, 0.008117676,
|
||||
0.016036987, 0.013168335, -0.023147583, -0.023757935, -0.0026760101,
|
||||
0.006137848, -0.05105591, 0.00415802, -0.027130127, -0.027694702,
|
||||
0.024108887, -0.046569824, 0.009689331, 0.034698486, -0.0017528534,
|
||||
-0.029556274, -0.018173218, -0.021865845, 0.0023612976, 0.024719238,
|
||||
-0.026412964, -0.02180481, 0.03765869, 0.026000977, -0.04714966,
|
||||
-0.016921997, -0.05758667, -0.054748535, 0.024841309, 0.012245178,
|
||||
0.007209778, -0.011512756, 0.024383545, -0.017684937, 0.03744507,
|
||||
0.029449463, -0.026687622, -0.0030841827, -0.029632568, -0.04284668,
|
||||
-0.016342163, -0.014312744, -0.050567627, -0.022583008, -0.02734375,
|
||||
-0.019989014, -0.035064697, 0.05279541, -0.0027122498, -0.02053833,
|
||||
0.057525635, 0.007511139, -0.0078125, 0.045898438, -0.0032424927,
|
||||
0.031051636, 0.035308838, -0.0138549805, -0.0050201416, -0.016052246,
|
||||
-0.026550293, 0.02520752, 0.036895752, -0.053710938, 0.0058937073,
|
||||
0.026107788, 0.011451721, -0.017547607, -0.013244629, 0.02998352,
|
||||
-0.017974854, 0.041381836, -0.030639648, 0.0073928833, -0.047302246,
|
||||
0.023864746, -0.034423828, -0.003648758, -0.05065918, 0.011138916,
|
||||
-0.04852295, 0.0055122375, -0.016189575, -0.0057640076, 0.0034179688,
|
||||
0.03491211, -0.012741089, 0.01234436, 0.023269653, 0.010360718,
|
||||
0.008384705, -0.021636963, -0.014778137, 0.026123047, 0.040008545,
|
||||
0.012611389, 0.0022697449, 0.012626648, 0.041900635, -0.051696777,
|
||||
0.048339844, -0.019607544, -0.026443481, 0.011444092, -0.087524414,
|
||||
0.03894043, 0.030303955, 0.0050468445, 0.01423645, -0.03149414,
|
||||
0.027404785, 0.035705566, 0.02192688, -0.033203125, -0.017684937,
|
||||
-0.020599365, -0.0021133423, 0.024536133, 0.04272461, 0.013031006,
|
||||
0.06451416, -0.020019531, 0.02520752, 0.04586792, -0.009757996,
|
||||
0.014183044, -0.001783371, -0.036743164, 0.0028133392, 0.0010175705,
|
||||
-0.00422287, 0.041503906, -0.005466461, -0.013252258, 0.008262634,
|
||||
-0.0030021667, -0.0049324036, -0.013511658, -0.03164673, 0.037475586,
|
||||
0.0029945374, 0.00015115738, -0.010971069, -0.022445679, -0.020614624,
|
||||
-0.01626587, 0.0262146, -0.0037288666, -0.057128906, -0.06072998,
|
||||
0.014945984, -0.05984497, -0.0059280396, -0.016662598, 0.019958496,
|
||||
-0.03164673, 0.021148682, 0.02230835, -0.03527832, -0.014122009,
|
||||
0.021911621, 0.032958984, -0.088012695, 0.0036849976, -0.011276245,
|
||||
-0.06100464, 0.031280518, -0.008308411, -0.009002686, 0.033081055,
|
||||
-0.029373169, 0.040161133, 0.035125732, 0.021850586, 0.04827881,
|
||||
0.034210205, 0.02708435, 0.018005371, 0.010238647, -0.02041626,
|
||||
-0.026260376, 0.052246094, -0.014007568, -0.017105103, -0.014526367,
|
||||
-0.018463135, -0.011711121, -0.026062012, 0.017852783, 0.054138184,
|
||||
0.012672424, -0.035980225, 0.043273926, -0.024230957, -0.008758545,
|
||||
-0.018615723, 0.01676941, -0.018859863, -0.0209198, 0.035064697,
|
||||
-0.014350891, -0.020828247, 0.008285522, -0.003068924, -0.016143799,
|
||||
-0.032165527, -0.022262573, 0.049102783, 0.00712204, 0.0054626465,
|
||||
-0.004009247, 0.028030396, -0.003145218, 0.028076172, -0.05593872,
|
||||
0.01663208, 0.03466797, -0.0049934387, -0.01928711, -0.043029785,
|
||||
0.0158844, -0.036102295, 0.017303467, 0.021011353, 0.0009908676,
|
||||
-0.038208008, 0.042633057, -0.07446289, 0.054840088, -0.04711914,
|
||||
-0.0021762848, 0.049926758, 0.028167725, 0.053741455, -0.023956299,
|
||||
-0.023895264, -0.05178833, 0.0007777214, -0.03994751, -0.011856079,
|
||||
-0.016799927, 0.008026123, 0.009979248, 0.01687622, 0.032714844,
|
||||
-0.03186035, 0.023513794, 0.009979248, 0.029571533, 0.03010559,
|
||||
-0.02508545, -0.057891846, 0.03842163, -0.015686035, -0.024414062,
|
||||
0.016281128, -0.027252197, 0.021057129, -0.019195557, -0.006385803,
|
||||
-0.049987793, -0.019958496, -0.02558899, 0.032287598, -0.013839722,
|
||||
0.005065918, 0.02394104, 0.01084137, -0.029052734, 0.028717041,
|
||||
0.0074882507, 0.0003876686, 0.03640747, 0.0023765564, -0.012466431,
|
||||
0.020553589, -0.014602661, -0.028244019, 0.02458191, -0.032348633,
|
||||
-0.0647583, -0.014434814, 0.027313232, 0.04977417, -0.026382446,
|
||||
0.027618408, 0.016967773, 0.004673004, 0.03100586, -0.046295166,
|
||||
0.0013895035, 0.062805176, -0.014640808, -0.049987793, 0.01701355,
|
||||
-0.04397583, 0.0052719116, -0.01637268, -0.029434204, 0.031341553,
|
||||
0.045440674, -0.013305664, 0.021118164, -0.044189453, -0.03878784,
|
||||
0.024749756, -0.014762878, -0.061187744, -0.006828308, 0.011177063,
|
||||
0.01235199, -0.002626419, -0.024658203, 0.000019192696, -0.0031490326,
|
||||
0.050872803, 0.023254395, -0.015792847, -0.0035362244, 0.026229858,
|
||||
0.0042266846, 0.0102005005, 0.066711426, -0.023757935, 0.012107849,
|
||||
0.009933472, 0.06274414, -0.013458252, -0.028686523, -0.034606934,
|
||||
0.0041618347, 0.016479492, 0.053131104, -0.025756836, -0.026611328,
|
||||
0.012031555, -0.007835388, -0.017440796, -0.055755615, 0.022537231,
|
||||
0.016082764, 0.0038070679, 0.03378296, 0.0309906, -0.07714844,
|
||||
-0.011024475, -0.018066406, -0.015197754, 0.045410156, -0.022125244,
|
||||
0.024719238, -0.008857727, 0.010612488, 0.016296387, -0.022399902,
|
||||
-0.06121826, -0.074645996, -0.008956909, -0.123046875, 0.010215759,
|
||||
-0.022476196, -0.09185791, 0.017440796, 0.043121338, 0.010696411,
|
||||
-0.050598145, -0.0027599335, -0.015457153, -0.014411926, 0.04473877,
|
||||
0.0181427, -0.015945435, -0.04232788, 0.052734375, -0.0022201538,
|
||||
-0.019012451, 0.05255127, -0.009086609, 0.0041046143, 0.0020389557,
|
||||
-0.009750366, 0.015731812, -0.038208008, -0.015701294, 0.051116943,
|
||||
-0.010101318, -0.09564209, -0.017471313, 0.028518677, -0.00011640787,
|
||||
-0.051361084, -0.0032081604, 0.008171082, -0.0067749023, -0.045318604,
|
||||
0.040863037, -0.03488159, -0.036895752, 0.0020503998, 0.0017614365,
|
||||
-0.0036849976, 0.04119873, 0.016067505, 0.05102539, -0.0491333,
|
||||
-0.026382446, -0.0073547363, 0.06097412, -0.002023697, 0.0009775162,
|
||||
0.02268982, 0.013671875, 0.054626465, -0.0003399849, -0.0050315857,
|
||||
0.019973755, 0.0138549805, -0.005508423, -0.0004553795, 0.05496216,
|
||||
-0.013442993, -0.031829834, -0.005458832, 0.01272583, 0.0056495667,
|
||||
-0.029373169, -0.021102905, -0.025268555, 0.04776001, -0.04849243,
|
||||
0.009857178, 0.012306213, -0.033996582, -0.03717041, -0.010063171,
|
||||
-0.019165039, 0.07092285, -0.01259613, 0.00023555756, -0.028305054,
|
||||
-0.038513184, 0.00868988, 0.010032654, -0.009246826, 0.013023376,
|
||||
-0.008224487, 0.07287598, -0.042419434, 0.00054454803, -0.010986328,
|
||||
-0.0024337769, 0.03152466, 0.00422287, -0.0021686554, 0.024139404,
|
||||
0.0060310364, 0.013374329, 0.040039062, 0.013916016, 0.02243042,
|
||||
-0.018493652, 0.015960693, 0.020614624, 0.013214111, -0.02633667,
|
||||
-0.03262329, -0.04510498, -0.005256653, 0.021316528, 0.0034618378,
|
||||
0.053222656, 0.03540039, -0.034118652, -0.000050604343, 0.04309082,
|
||||
-0.006801605, -0.014389038, -0.053619385, -0.035491943, -0.034820557,
|
||||
0.00843811, 0.017333984, 0.039489746, -0.06512451, -0.08959961,
|
||||
0.016235352, 0.039031982, -0.016174316, 0.016616821, -0.026489258,
|
||||
0.00040388107, 0.009437561, -0.03869629, 0.014427185, 0.008460999,
|
||||
0.0027809143, -0.012451172, 0.015144348, 0.049926758, 0.030151367,
|
||||
-0.011665344, -0.030014038, 0.06109619, -0.009292603, 0.00025629997,
|
||||
0.016540527, 0.027404785, -0.019958496, -0.019210815, 0.049713135,
|
||||
-0.028930664, 0.01222229, -0.011878967, -0.009170532, 0.006866455,
|
||||
0.04916382, -0.013084412, 0.025558472, -0.032226562, 0.018692017,
|
||||
-0.047424316, 0.045074463, -0.046875, -0.01939392, 0.012382507,
|
||||
-0.0030975342, -0.0060691833, -0.025848389, -0.016235352, -0.0043678284,
|
||||
-0.040405273, -0.03677368, 0.03475952, -0.045288086, 0.04046631,
|
||||
0.03353882, -0.038360596, -0.014350891, -0.039489746, -0.029663086,
|
||||
-0.011779785, 0.012458801, 0.01423645, 0.013343811, 0.011833191,
|
||||
0.041381836, 0.026473999, 0.11871338, 0.027236938, 0.052856445,
|
||||
-0.055145264, 0.04748535, 0.018859863, 0.015701294, -0.021453857,
|
||||
0.00687027, -0.011810303, 0.022766113, 0.026626587, -0.021392822,
|
||||
-0.011657715, 0.0008201599, 0.011108398, -0.0056877136, -0.012550354,
|
||||
0.01600647, -0.020309448, 0.007587433, 0.00007736683, 0.026550293,
|
||||
0.007545471, 0.03955078, -0.05050659, -0.012161255, -0.04019165,
|
||||
-0.002002716, -0.014381409, -0.0032672882, 0.0619812, -0.01638794,
|
||||
-0.030532837, -0.025009155, 0.01826477, 0.02192688, -0.049346924,
|
||||
-0.022613525, 0.036590576, 0.0009851456, -0.03062439, -0.08404541,
|
||||
-0.018844604, -0.008270264, 0.009033203, -0.028656006, 0.00077199936,
|
||||
0.010955811, -0.013267517, 0.024795532, 0.006126404, 0.02519226,
|
||||
-0.0067825317, 0.033050537, 0.040405273, -0.0017957687, 0.019989014,
|
||||
0.0055160522, -0.0289917, 0.0043029785, -0.038024902, -0.021331787,
|
||||
0.000076293945, 0.07116699, -0.04071045, -0.0036392212, -0.034301758,
|
||||
-0.0039024353, -0.027938843, -0.08569336, 0.025802612, -0.025100708,
|
||||
-0.011383057, -0.014770508, -0.005870819, 0.04083252, 0.031921387,
|
||||
0.0066452026, 0.0017795563, 0.020889282, 0.008766174, -0.04321289,
|
||||
-0.0031108856, -0.02772522, 0.0066604614, -0.06689453, -0.033111572,
|
||||
0.029876709, -0.024414062, 0.0031051636, -0.08502197, 0.0021133423,
|
||||
0.0027370453, 0.0005173683, -0.0023441315, 0.0076828003, -0.046783447,
|
||||
-0.018814087, -0.016342163, -0.043304443, -0.047943115, 0.039245605,
|
||||
0.07208252, -0.053100586, 0.013511658, -0.0033283234, -0.031402588,
|
||||
0.06463623, -0.030059814, -0.050231934, 0.023971558, -0.014717102,
|
||||
-0.0073432922, -0.01171875, -0.02760315, -0.00058841705, 0.037109375,
|
||||
-0.02684021, -0.018463135, -0.0025234222, -0.027053833, 0.050689697,
|
||||
-0.026046753, -0.0067825317, 0.052337646, -0.04260254, 0.018539429,
|
||||
-0.03692627, 0.022369385, -0.025039673, 0.01525116, 0.032165527,
|
||||
-0.00422287, 0.0059661865, -0.0073280334, 0.017303467, -0.012710571,
|
||||
-0.03338623, -0.03137207, -0.01789856, 0.005458832
|
||||
],
|
||||
[
|
||||
0.050720215, -0.025253296, 0.018859863, -0.060180664, -0.008003235,
|
||||
0.02192688, -0.020126343, 0.0068893433, 0.040252686, 0.08441162,
|
||||
0.025665283, 0.0036411285, 0.03982544, -0.0021705627, -0.035705566,
|
||||
0.01020813, 0.025894165, 0.018508911, 0.01966858, -0.026672363,
|
||||
0.017089844, -0.010887146, 0.0019197464, 0.009437561, -0.015419006,
|
||||
0.06439209, 0.04019165, -0.015975952, -0.02067566, -0.016555786,
|
||||
-0.0010957718, -0.01838684, 0.045898438, 0.0023231506, -0.022155762,
|
||||
0.011688232, -0.020401001, -0.026412964, -0.02255249, 0.0013628006,
|
||||
-0.026275635, 0.018966675, -0.010017395, -0.049316406, -0.07763672,
|
||||
0.0066070557, -0.039245605, 0.04776001, 0.039733887, -0.019332886,
|
||||
0.0005726814, 0.017242432, 0.0050201416, -0.017471313, -0.015403748,
|
||||
0.02255249, 0.001572609, -0.03491211, 0.02078247, 0.011054993,
|
||||
0.006095886, 0.0012397766, 0.023040771, 0.025466919, 0.027023315,
|
||||
0.035583496, 0.08203125, 0.011604309, 0.022216797, -0.026992798,
|
||||
-0.04067993, -0.0070381165, 0.03677368, -0.02748108, -0.0335083,
|
||||
0.025543213, 0.005680084, 0.0107803345, 0.035949707, -0.04876709,
|
||||
0.095825195, 0.0022659302, 0.07824707, 0.012763977, -0.005420685,
|
||||
0.011138916, 0.029067993, -0.03390503, -0.011413574, -0.013313293,
|
||||
-0.019592285, 0.042510986, -0.042785645, 0.030960083, -0.016403198,
|
||||
0.0018463135, 0.022537231, -0.0011920929, -0.044311523, -0.018127441,
|
||||
0.01953125, -0.029327393, 0.021957397, -0.011230469, 0.0149002075,
|
||||
0.035949707, -0.012054443, 0.070495605, 0.07702637, 0.020904541,
|
||||
0.008781433, 0.049804688, -0.027801514, 0.008415222, -0.030349731,
|
||||
0.02470398, -0.042541504, -0.0023899078, -0.0049552917, -0.0027923584,
|
||||
-0.02558899, 0.025939941, 0.012519836, -0.090270996, -0.0047836304,
|
||||
-0.02619934, -0.017822266, -0.016662598, 0.022766113, 0.012741089,
|
||||
-0.0014429092, 0.040161133, 0.0011053085, -0.019882202, -0.039733887,
|
||||
0.013244629, 0.022369385, 0.032043457, 0.009048462, 0.046539307,
|
||||
0.019546509, -0.03488159, 0.022445679, 0.0027885437, 0.002456665,
|
||||
0.035339355, 0.036834717, -0.018630981, -0.030380249, -0.004989624,
|
||||
-0.042114258, 0.0056419373, 0.016189575, 0.011451721, -0.034851074,
|
||||
-0.0005874634, -0.06793213, 0.0044517517, 0.010971069, 0.006412506,
|
||||
0.014167786, -0.007965088, -0.04449463, -0.029205322, -0.076660156,
|
||||
0.0044059753, 0.047851562, 0.025344849, 0.00012153387, 0.07354736,
|
||||
-0.044189453, 0.043395996, 0.025848389, 0.049072266, -0.0019721985,
|
||||
-0.0046691895, -0.0004079342, 0.006008148, 0.027114868, -0.042541504,
|
||||
-0.04498291, -0.049926758, 0.020126343, -0.0037727356, -0.025283813,
|
||||
0.009117126, -0.027618408, 0.0058937073, 0.068847656, -0.006713867,
|
||||
-0.017364502, -0.026062012, 0.06549072, -0.021942139, 0.0008788109,
|
||||
-0.057128906, -0.023498535, 0.014709473, -0.02331543, -0.0158844,
|
||||
0.008895874, 0.040802002, -0.03564453, -0.00333786, -0.038757324,
|
||||
-0.030136108, -0.0037994385, 0.030578613, -0.012077332, -0.001540184,
|
||||
0.023529053, -0.034606934, -0.02178955, 0.023590088, -0.017700195,
|
||||
-0.04168701, 0.0072021484, -0.018508911, -0.0042686462, -0.046661377,
|
||||
0.03805542, 0.039154053, 0.0031318665, 0.07269287, 0.018325806,
|
||||
0.021957397, -0.02003479, 0.028549194, 0.04058838, 0.03149414,
|
||||
-0.012687683, -0.024353027, 0.01612854, 0.02494812, -0.035095215,
|
||||
0.017822266, 0.021865845, 0.0592041, -0.015838623, -0.0044555664,
|
||||
0.010139465, 0.0021953583, -0.04309082, 0.021942139, -0.005607605,
|
||||
-0.056671143, -0.013801575, 0.03338623, -0.00020134449, 0.09112549,
|
||||
0.022399902, 0.016906738, -0.0017642975, -0.012428284, -0.0362854,
|
||||
0.022735596, 0.013328552, -0.0066070557, -0.033294678, 0.01398468,
|
||||
0.0057754517, 0.005077362, -0.037017822, 0.013420105, 0.08148193,
|
||||
-0.03665161, 0.024368286, -0.0016231537, -0.02973938, 0.0023231506,
|
||||
0.029296875, -0.035705566, -0.00680542, 0.051330566, 0.019592285,
|
||||
-0.042633057, -0.030792236, 0.008384705, 0.0121536255, 0.014945984,
|
||||
-0.009254456, 0.009719849, -0.029510498, -0.02015686, 0.05722046,
|
||||
0.02319336, -0.021194458, -0.050933838, -0.021987915, 0.026473999,
|
||||
0.03729248, 0.043640137, 0.022491455, -0.018341064, 0.029937744,
|
||||
0.004016876, 0.10595703, 0.014282227, 0.0027809143, 0.010871887,
|
||||
0.022613525, 0.049621582, 0.041229248, -0.029891968, -0.003320694,
|
||||
-0.011787415, 0.004383087, 0.016998291, -0.010032654, -0.008041382,
|
||||
-0.03692627, 0.031036377, 0.0129470825, -0.014122009, -0.019683838,
|
||||
-0.05117798, -0.012664795, -0.020492554, -0.06341553, -0.030059814,
|
||||
0.050567627, -0.03253174, -0.010299683, 0.035095215, -0.023651123,
|
||||
-0.011520386, 0.072143555, 0.0026130676, -0.028778076, 0.04336548,
|
||||
0.06500244, 0.049957275, 0.008773804, -0.010055542, 0.008117676,
|
||||
0.016036987, 0.013168335, -0.023147583, -0.023757935, -0.0026760101,
|
||||
0.006137848, -0.05105591, 0.00415802, -0.027130127, -0.027694702,
|
||||
0.024108887, -0.046569824, 0.009689331, 0.034698486, -0.0017528534,
|
||||
-0.029556274, -0.018173218, -0.021865845, 0.0023612976, 0.024719238,
|
||||
-0.026412964, -0.02180481, 0.03765869, 0.026000977, -0.04714966,
|
||||
-0.016921997, -0.05758667, -0.054748535, 0.024841309, 0.012245178,
|
||||
0.007209778, -0.011512756, 0.024383545, -0.017684937, 0.03744507,
|
||||
0.029449463, -0.026687622, -0.0030841827, -0.029632568, -0.04284668,
|
||||
-0.016342163, -0.014312744, -0.050567627, -0.022583008, -0.02734375,
|
||||
-0.019989014, -0.035064697, 0.05279541, -0.0027122498, -0.02053833,
|
||||
0.057525635, 0.007511139, -0.0078125, 0.045898438, -0.0032424927,
|
||||
0.031051636, 0.035308838, -0.0138549805, -0.0050201416, -0.016052246,
|
||||
-0.026550293, 0.02520752, 0.036895752, -0.053710938, 0.0058937073,
|
||||
0.026107788, 0.011451721, -0.017547607, -0.013244629, 0.02998352,
|
||||
-0.017974854, 0.041381836, -0.030639648, 0.0073928833, -0.047302246,
|
||||
0.023864746, -0.034423828, -0.003648758, -0.05065918, 0.011138916,
|
||||
-0.04852295, 0.0055122375, -0.016189575, -0.0057640076, 0.0034179688,
|
||||
0.03491211, -0.012741089, 0.01234436, 0.023269653, 0.010360718,
|
||||
0.008384705, -0.021636963, -0.014778137, 0.026123047, 0.040008545,
|
||||
0.012611389, 0.0022697449, 0.012626648, 0.041900635, -0.051696777,
|
||||
0.048339844, -0.019607544, -0.026443481, 0.011444092, -0.087524414,
|
||||
0.03894043, 0.030303955, 0.0050468445, 0.01423645, -0.03149414,
|
||||
0.027404785, 0.035705566, 0.02192688, -0.033203125, -0.017684937,
|
||||
-0.020599365, -0.0021133423, 0.024536133, 0.04272461, 0.013031006,
|
||||
0.06451416, -0.020019531, 0.02520752, 0.04586792, -0.009757996,
|
||||
0.014183044, -0.001783371, -0.036743164, 0.0028133392, 0.0010175705,
|
||||
-0.00422287, 0.041503906, -0.005466461, -0.013252258, 0.008262634,
|
||||
-0.0030021667, -0.0049324036, -0.013511658, -0.03164673, 0.037475586,
|
||||
0.0029945374, 0.00015115738, -0.010971069, -0.022445679, -0.020614624,
|
||||
-0.01626587, 0.0262146, -0.0037288666, -0.057128906, -0.06072998,
|
||||
0.014945984, -0.05984497, -0.0059280396, -0.016662598, 0.019958496,
|
||||
-0.03164673, 0.021148682, 0.02230835, -0.03527832, -0.014122009,
|
||||
0.021911621, 0.032958984, -0.088012695, 0.0036849976, -0.011276245,
|
||||
-0.06100464, 0.031280518, -0.008308411, -0.009002686, 0.033081055,
|
||||
-0.029373169, 0.040161133, 0.035125732, 0.021850586, 0.04827881,
|
||||
0.034210205, 0.02708435, 0.018005371, 0.010238647, -0.02041626,
|
||||
-0.026260376, 0.052246094, -0.014007568, -0.017105103, -0.014526367,
|
||||
-0.018463135, -0.011711121, -0.026062012, 0.017852783, 0.054138184,
|
||||
0.012672424, -0.035980225, 0.043273926, -0.024230957, -0.008758545,
|
||||
-0.018615723, 0.01676941, -0.018859863, -0.0209198, 0.035064697,
|
||||
-0.014350891, -0.020828247, 0.008285522, -0.003068924, -0.016143799,
|
||||
-0.032165527, -0.022262573, 0.049102783, 0.00712204, 0.0054626465,
|
||||
-0.004009247, 0.028030396, -0.003145218, 0.028076172, -0.05593872,
|
||||
0.01663208, 0.03466797, -0.0049934387, -0.01928711, -0.043029785,
|
||||
0.0158844, -0.036102295, 0.017303467, 0.021011353, 0.0009908676,
|
||||
-0.038208008, 0.042633057, -0.07446289, 0.054840088, -0.04711914,
|
||||
-0.0021762848, 0.049926758, 0.028167725, 0.053741455, -0.023956299,
|
||||
-0.023895264, -0.05178833, 0.0007777214, -0.03994751, -0.011856079,
|
||||
-0.016799927, 0.008026123, 0.009979248, 0.01687622, 0.032714844,
|
||||
-0.03186035, 0.023513794, 0.009979248, 0.029571533, 0.03010559,
|
||||
-0.02508545, -0.057891846, 0.03842163, -0.015686035, -0.024414062,
|
||||
0.016281128, -0.027252197, 0.021057129, -0.019195557, -0.006385803,
|
||||
-0.049987793, -0.019958496, -0.02558899, 0.032287598, -0.013839722,
|
||||
0.005065918, 0.02394104, 0.01084137, -0.029052734, 0.028717041,
|
||||
0.0074882507, 0.0003876686, 0.03640747, 0.0023765564, -0.012466431,
|
||||
0.020553589, -0.014602661, -0.028244019, 0.02458191, -0.032348633,
|
||||
-0.0647583, -0.014434814, 0.027313232, 0.04977417, -0.026382446,
|
||||
0.027618408, 0.016967773, 0.004673004, 0.03100586, -0.046295166,
|
||||
0.0013895035, 0.062805176, -0.014640808, -0.049987793, 0.01701355,
|
||||
-0.04397583, 0.0052719116, -0.01637268, -0.029434204, 0.031341553,
|
||||
0.045440674, -0.013305664, 0.021118164, -0.044189453, -0.03878784,
|
||||
0.024749756, -0.014762878, -0.061187744, -0.006828308, 0.011177063,
|
||||
0.01235199, -0.002626419, -0.024658203, 0.000019192696, -0.0031490326,
|
||||
0.050872803, 0.023254395, -0.015792847, -0.0035362244, 0.026229858,
|
||||
0.0042266846, 0.0102005005, 0.066711426, -0.023757935, 0.012107849,
|
||||
0.009933472, 0.06274414, -0.013458252, -0.028686523, -0.034606934,
|
||||
0.0041618347, 0.016479492, 0.053131104, -0.025756836, -0.026611328,
|
||||
0.012031555, -0.007835388, -0.017440796, -0.055755615, 0.022537231,
|
||||
0.016082764, 0.0038070679, 0.03378296, 0.0309906, -0.07714844,
|
||||
-0.011024475, -0.018066406, -0.015197754, 0.045410156, -0.022125244,
|
||||
0.024719238, -0.008857727, 0.010612488, 0.016296387, -0.022399902,
|
||||
-0.06121826, -0.074645996, -0.008956909, -0.123046875, 0.010215759,
|
||||
-0.022476196, -0.09185791, 0.017440796, 0.043121338, 0.010696411,
|
||||
-0.050598145, -0.0027599335, -0.015457153, -0.014411926, 0.04473877,
|
||||
0.0181427, -0.015945435, -0.04232788, 0.052734375, -0.0022201538,
|
||||
-0.019012451, 0.05255127, -0.009086609, 0.0041046143, 0.0020389557,
|
||||
-0.009750366, 0.015731812, -0.038208008, -0.015701294, 0.051116943,
|
||||
-0.010101318, -0.09564209, -0.017471313, 0.028518677, -0.00011640787,
|
||||
-0.051361084, -0.0032081604, 0.008171082, -0.0067749023, -0.045318604,
|
||||
0.040863037, -0.03488159, -0.036895752, 0.0020503998, 0.0017614365,
|
||||
-0.0036849976, 0.04119873, 0.016067505, 0.05102539, -0.0491333,
|
||||
-0.026382446, -0.0073547363, 0.06097412, -0.002023697, 0.0009775162,
|
||||
0.02268982, 0.013671875, 0.054626465, -0.0003399849, -0.0050315857,
|
||||
0.019973755, 0.0138549805, -0.005508423, -0.0004553795, 0.05496216,
|
||||
-0.013442993, -0.031829834, -0.005458832, 0.01272583, 0.0056495667,
|
||||
-0.029373169, -0.021102905, -0.025268555, 0.04776001, -0.04849243,
|
||||
0.009857178, 0.012306213, -0.033996582, -0.03717041, -0.010063171,
|
||||
-0.019165039, 0.07092285, -0.01259613, 0.00023555756, -0.028305054,
|
||||
-0.038513184, 0.00868988, 0.010032654, -0.009246826, 0.013023376,
|
||||
-0.008224487, 0.07287598, -0.042419434, 0.00054454803, -0.010986328,
|
||||
-0.0024337769, 0.03152466, 0.00422287, -0.0021686554, 0.024139404,
|
||||
0.0060310364, 0.013374329, 0.040039062, 0.013916016, 0.02243042,
|
||||
-0.018493652, 0.015960693, 0.020614624, 0.013214111, -0.02633667,
|
||||
-0.03262329, -0.04510498, -0.005256653, 0.021316528, 0.0034618378,
|
||||
0.053222656, 0.03540039, -0.034118652, -0.000050604343, 0.04309082,
|
||||
-0.006801605, -0.014389038, -0.053619385, -0.035491943, -0.034820557,
|
||||
0.00843811, 0.017333984, 0.039489746, -0.06512451, -0.08959961,
|
||||
0.016235352, 0.039031982, -0.016174316, 0.016616821, -0.026489258,
|
||||
0.00040388107, 0.009437561, -0.03869629, 0.014427185, 0.008460999,
|
||||
0.0027809143, -0.012451172, 0.015144348, 0.049926758, 0.030151367,
|
||||
-0.011665344, -0.030014038, 0.06109619, -0.009292603, 0.00025629997,
|
||||
0.016540527, 0.027404785, -0.019958496, -0.019210815, 0.049713135,
|
||||
-0.028930664, 0.01222229, -0.011878967, -0.009170532, 0.006866455,
|
||||
0.04916382, -0.013084412, 0.025558472, -0.032226562, 0.018692017,
|
||||
-0.047424316, 0.045074463, -0.046875, -0.01939392, 0.012382507,
|
||||
-0.0030975342, -0.0060691833, -0.025848389, -0.016235352, -0.0043678284,
|
||||
-0.040405273, -0.03677368, 0.03475952, -0.045288086, 0.04046631,
|
||||
0.03353882, -0.038360596, -0.014350891, -0.039489746, -0.029663086,
|
||||
-0.011779785, 0.012458801, 0.01423645, 0.013343811, 0.011833191,
|
||||
0.041381836, 0.026473999, 0.11871338, 0.027236938, 0.052856445,
|
||||
-0.055145264, 0.04748535, 0.018859863, 0.015701294, -0.021453857,
|
||||
0.00687027, -0.011810303, 0.022766113, 0.026626587, -0.021392822,
|
||||
-0.011657715, 0.0008201599, 0.011108398, -0.0056877136, -0.012550354,
|
||||
0.01600647, -0.020309448, 0.007587433, 0.00007736683, 0.026550293,
|
||||
0.007545471, 0.03955078, -0.05050659, -0.012161255, -0.04019165,
|
||||
-0.002002716, -0.014381409, -0.0032672882, 0.0619812, -0.01638794,
|
||||
-0.030532837, -0.025009155, 0.01826477, 0.02192688, -0.049346924,
|
||||
-0.022613525, 0.036590576, 0.0009851456, -0.03062439, -0.08404541,
|
||||
-0.018844604, -0.008270264, 0.009033203, -0.028656006, 0.00077199936,
|
||||
0.010955811, -0.013267517, 0.024795532, 0.006126404, 0.02519226,
|
||||
-0.0067825317, 0.033050537, 0.040405273, -0.0017957687, 0.019989014,
|
||||
0.0055160522, -0.0289917, 0.0043029785, -0.038024902, -0.021331787,
|
||||
0.000076293945, 0.07116699, -0.04071045, -0.0036392212, -0.034301758,
|
||||
-0.0039024353, -0.027938843, -0.08569336, 0.025802612, -0.025100708,
|
||||
-0.011383057, -0.014770508, -0.005870819, 0.04083252, 0.031921387,
|
||||
0.0066452026, 0.0017795563, 0.020889282, 0.008766174, -0.04321289,
|
||||
-0.0031108856, -0.02772522, 0.0066604614, -0.06689453, -0.033111572,
|
||||
0.029876709, -0.024414062, 0.0031051636, -0.08502197, 0.0021133423,
|
||||
0.0027370453, 0.0005173683, -0.0023441315, 0.0076828003, -0.046783447,
|
||||
-0.018814087, -0.016342163, -0.043304443, -0.047943115, 0.039245605,
|
||||
0.07208252, -0.053100586, 0.013511658, -0.0033283234, -0.031402588,
|
||||
0.06463623, -0.030059814, -0.050231934, 0.023971558, -0.014717102,
|
||||
-0.0073432922, -0.01171875, -0.02760315, -0.00058841705, 0.037109375,
|
||||
-0.02684021, -0.018463135, -0.0025234222, -0.027053833, 0.050689697,
|
||||
-0.026046753, -0.0067825317, 0.052337646, -0.04260254, 0.018539429,
|
||||
-0.03692627, 0.022369385, -0.025039673, 0.01525116, 0.032165527,
|
||||
-0.00422287, 0.0059661865, -0.0073280334, 0.017303467, -0.012710571,
|
||||
-0.03338623, -0.03137207, -0.01789856, 0.005458832
|
||||
]
|
||||
],
|
||||
meta: {
|
||||
api_version: {
|
||||
version: '1'
|
||||
},
|
||||
billed_units: {
|
||||
input_tokens: 8
|
||||
}
|
||||
},
|
||||
response_type: 'embeddings_floats'
|
||||
};
|
||||
export default data;
|
||||
@ -0,0 +1,116 @@
|
||||
import IconFont from '@/components/icon-font';
|
||||
import HotKeys from '@/config/hotkeys';
|
||||
import { PageContainer } from '@ant-design/pro-components';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Button, Space } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import _ from 'lodash';
|
||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { useHotkeys } from 'react-hotkeys-hook';
|
||||
import { queryModelsList } from './apis';
|
||||
import GroundEmbedding from './components/ground-embedding';
|
||||
import './style/play-ground.less';
|
||||
|
||||
const PlaygroundEmbedding: React.FC = () => {
|
||||
const intl = useIntl();
|
||||
const groundLeftRef = useRef<any>(null);
|
||||
const ref = useRef<any>(null);
|
||||
const [modelList, setModelList] = useState<Global.BaseOption<string>[]>([]);
|
||||
const [loaded, setLoaded] = useState(false);
|
||||
|
||||
const handleViewCode = useCallback(() => {
|
||||
ref.current?.viewCode?.();
|
||||
}, [ref.current]);
|
||||
|
||||
const handleToggleCollapse = useCallback(() => {
|
||||
ref.current?.setCollapse?.();
|
||||
}, [ref.current]);
|
||||
|
||||
useEffect(() => {
|
||||
const getModelListByEmbedding = async () => {
|
||||
try {
|
||||
const params = {
|
||||
embedding_only: true
|
||||
};
|
||||
const res = await queryModelsList(params);
|
||||
const list = _.map(res.data || [], (item: any) => {
|
||||
return {
|
||||
value: item.id,
|
||||
label: item.id
|
||||
};
|
||||
}) as Global.BaseOption<string>[];
|
||||
return list;
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return [];
|
||||
}
|
||||
};
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
const [dataList] = await Promise.all([getModelListByEmbedding()]);
|
||||
setModelList(dataList);
|
||||
} catch (error) {
|
||||
setLoaded(true);
|
||||
}
|
||||
};
|
||||
fetchData();
|
||||
}, []);
|
||||
|
||||
const renderExtra = () => {
|
||||
return (
|
||||
<Space key="buttons">
|
||||
<Button
|
||||
size="middle"
|
||||
onClick={handleViewCode}
|
||||
icon={<IconFont type="icon-code" className="font-size-16"></IconFont>}
|
||||
>
|
||||
{intl.formatMessage({ id: 'playground.viewcode' })}
|
||||
</Button>
|
||||
<Button
|
||||
size="middle"
|
||||
onClick={handleToggleCollapse}
|
||||
icon={
|
||||
<IconFont
|
||||
type="icon-a-layout6-line"
|
||||
className="font-size-16"
|
||||
></IconFont>
|
||||
}
|
||||
></Button>
|
||||
</Space>
|
||||
);
|
||||
};
|
||||
|
||||
useHotkeys(
|
||||
HotKeys.RIGHT.join(','),
|
||||
() => {
|
||||
groundLeftRef.current?.setCollapse?.();
|
||||
},
|
||||
{
|
||||
preventDefault: true
|
||||
}
|
||||
);
|
||||
|
||||
return (
|
||||
<PageContainer
|
||||
ghost
|
||||
header={{
|
||||
title: intl.formatMessage({ id: 'menu.playground.embedding' }),
|
||||
breadcrumb: {}
|
||||
}}
|
||||
extra={renderExtra()}
|
||||
className={classNames('playground-container chat')}
|
||||
>
|
||||
<div className="play-ground">
|
||||
<div className="chat">
|
||||
<GroundEmbedding
|
||||
ref={ref}
|
||||
modelList={modelList}
|
||||
loaded={loaded}
|
||||
></GroundEmbedding>
|
||||
</div>
|
||||
</div>
|
||||
</PageContainer>
|
||||
);
|
||||
};
|
||||
|
||||
export default PlaygroundEmbedding;
|
||||
Loading…
Reference in new issue