Skip to content

システムコンテキストの保存機能 #416

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

Merged
merged 9 commits into from
Apr 3, 2024
Merged

Conversation

Calic0Cat
Copy link
Collaborator

Issue #281 , if available:

Description of changes:

  • チャットのシステムコンテキストを保存する機能を追加
  • Prompt List の最下部に自身が作成したシステムコンテキストを表示する機能を追加

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Calic0Cat Calic0Cat added this to the 2024 Q1 milestone Mar 22, 2024
@Calic0Cat Calic0Cat self-assigned this Mar 22, 2024
@Calic0Cat Calic0Cat changed the title feat: system context save feature システムコンテキストの保存機能 Mar 25, 2024
Copy link
Contributor

@tbrand tbrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • sendIconEnabled のバグの影響だと思いますが、現状は「システムコンテキストを保存せずに変更する」ということができませんよね?これはデグレです。
  • 「プロンプト例」の中に「システムコンテキスト」があるのが不自然という指摘が直っていないです!「プロンプト例」と同じように「システムコンテキスト」を扱ってください!また「システムコンテキスト」だけだと意味が伝わらないと思うので、「保存したシステムコンテキスト」等にしてください!

@Calic0Cat Calic0Cat requested a review from tbrand March 28, 2024 05:54
@Calic0Cat Calic0Cat force-pushed the issue-281/system-prompt branch from 28ac1d3 to f054390 Compare April 2, 2024 04:21
<SystemContextItem
systemContextTitle={item.systemContextTitle}
systemContext={item.systemContext}
key={`${i}`}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これ key がないとエラーになりますか?(なくても問題ないように見えました)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます!
不要でした 🙏

systemContextTitle: string;
systemContext: string;
systemContextId: string;
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PrimaryKey があっても特に困らないのであれば types の SystemContext を使いまわした方がシンプルで良いと思いました!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

レビューありがとうございます!
使い回す形で修正しました!

return null;
}
return _systemContextId.split('#')[1];
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

実装が chatId と全く同じだと思うので、decomposeChatId を decomposeId とかに rename して使いまわした方が良いと思います!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

レビューありがとうございます!使い回すように変更しました!


type Props = BaseProps & {
onClick: (params: ChatPageQueryParams) => void;
systemContextListItem: SystemContextListItem[];
onClickDeleteSystemContext: (params: string, index: number) => void;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここは引数の名前が params ではないですよね?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正しました!

@@ -41,7 +41,7 @@
"allowedIpV4AddressRanges": null,
"allowedIpV6AddressRanges": null,
"allowedCountryCodes": null,
"dashboard": false,
"dashboard": true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cdk.json がコミットされています!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ご指摘ありがとうございます 🙏
修正しました!

@Calic0Cat Calic0Cat force-pushed the issue-281/system-prompt branch from d99d745 to 3f8edd2 Compare April 3, 2024 02:19
@Calic0Cat Calic0Cat requested a review from tbrand April 3, 2024 02:20
@tbrand tbrand merged commit 0429cab into main Apr 3, 2024
2 checks passed
@tbrand tbrand deleted the issue-281/system-prompt branch April 3, 2024 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants