-
Notifications
You must be signed in to change notification settings - Fork 381
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
feat: control LLM model selection through configuration #607
Conversation
frontend/src/@types/bot.d.ts
Outdated
@@ -2,6 +2,21 @@ import { BedrockKnowledgeBase } from '../features/knowledgeBase/types'; | |||
|
|||
export type BotKind = 'private' | 'mixed'; | |||
|
|||
export type ModelActivate = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こちらもBE同様、メンテ負荷を減らすため、conversation.d.tsのModel定義から動的に生成する方法でお願いします!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
対応しました。
…e bot storage logic
…elActivate across the application
frontend/src/constants/index.ts
Outdated
@@ -100,3 +101,20 @@ export const GUARDRAILS_CONTECTUAL_GROUNDING_THRESHOLD = { | |||
MIN: 0, | |||
STEP: 0.01, | |||
}; | |||
|
|||
export const MODEL_KEYS: Model[] = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
conversation.d.tsのModelから生成検討してください!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typescriptの言語の問題で、typeの中身を変数の値として使うことは実装不可能でした。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commitで実装
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@wadabee FE側ご確認いただけると助かります! |
<div key={key} className="flex items-center gap-2"> | ||
<Toggle | ||
value={ | ||
activeModels[ | ||
toCamelCase(key) as keyof ActiveModels | ||
] ?? true | ||
} | ||
onChange={(value) => onChangeActiveModels(key, value)} | ||
/> | ||
<span>{label}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここにもモデルの説明があったほうが良いかなと思いました!
L2398を className="flex items-start"
に変更して、
L2407を以下のように修正すると良い感じになると思います。
<div>
<div>{label}</div>
<div className="text-sm text-dark-gray">{description}</div>
</div>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修正しました。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
activeModelsOptions
こちらにdescription
の追加をお願いしますmm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…ace/react-app (aws-samples#607) * chore(deps): bump cross-spawn in /lib/user-interface/react-app Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6. - [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md) - [Commits](moxystudio/node-cross-spawn@v7.0.3...v7.0.6) --- updated-dependencies: - dependency-name: cross-spawn dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charles Marion <[email protected]>
Issue #, if available:
Closes #592
Closes #505
Description of changes:
When publishing chatbots, you may want to limit the models that can be used, such as when you want to restrict the use of expensive models.
This update adds the ability to limit which models can be used per custom chatbot.
All models can be used with regular chatbots.
Add ModelActivate to DynamoDB and set true/false whether the model can be used. The chatbot can only select models that are set to true.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.