Skip to content

Commit

Permalink
feat: fix bud
Browse files Browse the repository at this point in the history
  • Loading branch information
pomelo-nwu committed Jan 16, 2025
1 parent 8c6e0fb commit 41e69a7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions packages/studio-explore/src/components/Report/Intention.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ const Intention: React.FunctionComponent<IReportProps> = props => {
loading: true,
};
});

const { nodes, edges } = filterDataByParticalSchema(intention.schema, data);

const _res = await query([
Expand Down Expand Up @@ -158,6 +159,10 @@ const Intention: React.FunctionComponent<IReportProps> = props => {
children: (
<Flex vertical gap={12}>
<Typography.Text strong>Required data</Typography.Text>
<Typography.Text type="secondary" italic>
Please first ensure that the current canvas contains these types of nodes and edges. You can manually
adjust the set of node properties passed to the LLM.
</Typography.Text>

{intention.schema.nodes.map(item => {
const { id, label, properties = [] } = item;
Expand Down
2 changes: 1 addition & 1 deletion packages/studio-explore/src/components/Report/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const Report: React.FunctionComponent<IReportProps> = props => {
intention: ItentionType | null;
}>({
loading: false,
task: '请根据我选中的 papers ,分析关键技术随时间的变化,写对应的趋势分析报告',
task: '请根据我选中的 papers ,整理出一份趋势报告,重点考虑时间因素',
// '帮我把画布上的papers按照时间和引用数整理成一个分析报告',
// '请根据我选中的 papers ,以及 paper 关联的 challenge,写一个 related work section。要求 papers 按照 challenge 进行整理',
// '帮我把这些 Papers 整理写成一个 related work 的 section,关注点在 challenge 上',
Expand Down
4 changes: 2 additions & 2 deletions packages/studio-explore/src/components/Report/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const filterDataByParticalSchema = (schema, data) => {
return {
id,
label,
properties: match.properties.reduce((acc, curr) => {
properties: (match.properties || []).reduce((acc, curr) => {
return {
...acc,
[curr.name]: properties[curr.name],
Expand All @@ -41,7 +41,7 @@ export const filterDataByParticalSchema = (schema, data) => {
return {
id,
label,
properties: match.properties.reduce((acc, curr) => {
properties: (match.properties || []).reduce((acc, curr) => {
return {
...acc,
[curr.name]: properties[curr.name],
Expand Down

0 comments on commit 41e69a7

Please sign in to comment.