From 082d379c7f19e2904cac779c40f0d817e6440ec0 Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Wed, 20 Nov 2024 12:18:05 +0000 Subject: [PATCH 01/34] =?UTF-8?q?=E3=83=A2=E3=83=87=E3=83=AB=E9=81=B8?= =?UTF-8?q?=E6=8A=9E=E8=82=A2=E3=81=AE=E8=A8=AD=E5=AE=9A=E3=81=A8=E3=83=A2?= =?UTF-8?q?=E3=83=87=E3=83=AB=E3=81=AE=E5=88=87=E3=82=8A=E6=9B=BF=E3=81=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/repositories/custom_bot.py | 18 ++++ backend/app/repositories/models/custom_bot.py | 10 +++ backend/app/routes/bot.py | 6 ++ backend/app/routes/schemas/bot.py | 22 +++++ backend/app/usecases/bot.py | 36 ++++++++ frontend/src/@types/bot.d.ts | 14 ++++ .../components/SwitchBedrockModel.stories.tsx | 9 +- .../src/components/SwitchBedrockModel.tsx | 47 +++++++---- .../knowledgeBase/pages/BotKbEditPage.tsx | 82 ++++++++++++++++++- frontend/src/hooks/useModel.ts | 10 +++ frontend/src/i18n/en/index.ts | 6 +- frontend/src/i18n/ja/index.ts | 6 +- frontend/src/pages/ChatPage.tsx | 18 +++- 13 files changed, 264 insertions(+), 20 deletions(-) diff --git a/backend/app/repositories/custom_bot.py b/backend/app/repositories/custom_bot.py index 55004d151..4442e5f58 100644 --- a/backend/app/repositories/custom_bot.py +++ b/backend/app/repositories/custom_bot.py @@ -29,6 +29,7 @@ ConversationQuickStarterModel, GenerationParamsModel, KnowledgeModel, + ModelActivateModel, ) from app.repositories.models.custom_bot_guardrails import BedrockGuardrailsModel from app.repositories.models.custom_bot_kb import BedrockKnowledgeBaseModel @@ -88,6 +89,7 @@ def store_bot(user_id: str, custom_bot: BotModel): "ConversationQuickStarters": [ starter.model_dump() for starter in custom_bot.conversation_quick_starters ], + "ModelActivate": custom_bot.model_activate.model_dump(), } if custom_bot.bedrock_knowledge_base: item["BedrockKnowledgeBase"] = custom_bot.bedrock_knowledge_base.model_dump() @@ -113,6 +115,7 @@ def update_bot( conversation_quick_starters: list[ConversationQuickStarterModel], bedrock_knowledge_base: BedrockKnowledgeBaseModel | None = None, bedrock_guardrails: BedrockGuardrailsModel | None = None, + model_activate: ModelActivateModel | None = None, ): """Update bot title, description, and instruction. NOTE: Use `update_bot_visibility` to update visibility. @@ -159,6 +162,10 @@ def update_bot( bedrock_guardrails.model_dump() ) + if model_activate: + update_expression += ", ModelActivate = :model_activate" + expression_attribute_values[":model_activate"] = model_activate.model_dump() + try: response = table.update_item( Key={"PK": user_id, "SK": compose_bot_id(user_id, bot_id)}, @@ -486,6 +493,11 @@ def find_private_bot_by_id(user_id: str, bot_id: str) -> BotModel: if "GuardrailsParams" in item else None ), + model_activate=( + ModelActivateModel(**item["ModelActivate"]) + if "ModelActivate" in item + else None + ), ) logger.info(f"Found bot: {bot}") @@ -504,6 +516,7 @@ def find_public_bot_by_id(bot_id: str) -> BotModel: raise RecordNotFoundError(f"Public bot with id {bot_id} not found") item = response["Items"][0] + bot = BotModel( id=decompose_bot_id(item["SK"]), title=item["Title"], @@ -564,6 +577,11 @@ def find_public_bot_by_id(bot_id: str) -> BotModel: if "GuardrailsParams" in item else None ), + model_activate=( + ModelActivateModel(**item["ModelActivate"]) + if "ModelActivate" in item + else None + ), ) logger.info(f"Found public bot: {bot}") return bot diff --git a/backend/app/repositories/models/custom_bot.py b/backend/app/repositories/models/custom_bot.py index c0361419e..8d77a816b 100644 --- a/backend/app/repositories/models/custom_bot.py +++ b/backend/app/repositories/models/custom_bot.py @@ -54,6 +54,15 @@ class ConversationQuickStarterModel(BaseModel): example: str +class ModelActivateModel(BaseModel): + claude3_sonnet_v1: bool + claude3_haiku_v1: bool + claude3_opus_v1: bool + claude3_5_sonnet_v1: bool + claude3_5_sonnet_v2: bool + claude3_5_haiku_v1: bool + + class BotModel(BaseModel): id: str title: str @@ -78,6 +87,7 @@ class BotModel(BaseModel): conversation_quick_starters: list[ConversationQuickStarterModel] bedrock_knowledge_base: BedrockKnowledgeBaseModel | None bedrock_guardrails: BedrockGuardrailsModel | None + model_activate: ModelActivateModel | None def has_knowledge(self) -> bool: return ( diff --git a/backend/app/routes/bot.py b/backend/app/routes/bot.py index 8da7c3227..d795d1da3 100644 --- a/backend/app/routes/bot.py +++ b/backend/app/routes/bot.py @@ -22,6 +22,7 @@ ConversationQuickStarter, GenerationParams, Knowledge, + ModelActivateOutput, ) from app.usecases.bot import ( create_new_bot, @@ -152,6 +153,11 @@ def get_private_bot(request: Request, bot_id: str): if bot.bedrock_guardrails else None ), + model_activate=( + ModelActivateOutput(**bot.model_activate.model_dump()) + if bot.model_activate + else None + ) ) return output diff --git a/backend/app/routes/schemas/bot.py b/backend/app/routes/schemas/bot.py index 9cbeb4626..f6d439468 100644 --- a/backend/app/routes/schemas/bot.py +++ b/backend/app/routes/schemas/bot.py @@ -27,6 +27,23 @@ "ORIGINAL_NOT_FOUND", ] +class ModelActivateInput(BaseSchema): + claude3_sonnet_v1: bool = True + claude3_haiku_v1: bool = True + claude3_opus_v1: bool = True + claude3_5_sonnet_v1: bool = True + claude3_5_sonnet_v2: bool = True + claude3_5_haiku_v1: bool = True + + +class ModelActivateOutput(BaseSchema): + claude3_sonnet_v1: bool = True + claude3_haiku_v1: bool = True + claude3_opus_v1: bool = True + claude3_5_sonnet_v1: bool = True + claude3_5_sonnet_v2: bool = True + claude3_5_haiku_v1: bool = True + class GenerationParams(BaseSchema): max_tokens: int @@ -102,6 +119,7 @@ class BotInput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] | None bedrock_knowledge_base: BedrockKnowledgeBaseInput | None = None bedrock_guardrails: BedrockGuardrailsInput | None = None + model_activate: ModelActivateInput | None = None class BotModifyInput(BaseSchema): @@ -115,6 +133,7 @@ class BotModifyInput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] | None bedrock_knowledge_base: BedrockKnowledgeBaseInput | None = None bedrock_guardrails: BedrockGuardrailsInput | None = None + model_activate: ModelActivateInput | None = None def has_update_files(self) -> bool: return self.knowledge is not None and ( @@ -181,6 +200,7 @@ class BotModifyOutput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] bedrock_knowledge_base: BedrockKnowledgeBaseOutput | None bedrock_guardrails: BedrockGuardrailsOutput | None + model_activate: ModelActivateOutput | None class BotOutput(BaseSchema): @@ -204,6 +224,7 @@ class BotOutput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] bedrock_knowledge_base: BedrockKnowledgeBaseOutput | None bedrock_guardrails: BedrockGuardrailsOutput | None + model_activate: ModelActivateOutput | None class BotMetaOutput(BaseSchema): @@ -234,6 +255,7 @@ class BotSummaryOutput(BaseSchema): sync_status: type_sync_status has_knowledge: bool conversation_quick_starters: list[ConversationQuickStarter] + model_activate: ModelActivateOutput | None class BotSwitchVisibilityInput(BaseSchema): diff --git a/backend/app/usecases/bot.py b/backend/app/usecases/bot.py index 01ad626f4..5797535ae 100644 --- a/backend/app/usecases/bot.py +++ b/backend/app/usecases/bot.py @@ -35,6 +35,7 @@ ConversationQuickStarterModel, GenerationParamsModel, KnowledgeModel, + ModelActivateModel, ) from app.repositories.models.custom_bot_guardrails import BedrockGuardrailsModel from app.repositories.models.custom_bot_kb import BedrockKnowledgeBaseModel @@ -51,6 +52,8 @@ GenerationParams, Knowledge, type_sync_status, + ModelActivateInput, + ModelActivateOutput ) from app.routes.schemas.bot_guardrails import BedrockGuardrailsOutput from app.routes.schemas.bot_kb import BedrockKnowledgeBaseOutput @@ -203,6 +206,11 @@ def create_new_bot(user_id: str, bot_input: BotInput) -> BotOutput: if bot_input.bedrock_guardrails else None ), + model_activate=( + ModelActivateModel(**bot_input.model_activate.model_dump()) + if bot_input.model_activate + else None + ) ), ) return BotOutput( @@ -255,6 +263,11 @@ def create_new_bot(user_id: str, bot_input: BotInput) -> BotOutput: if bot_input.bedrock_guardrails else None ), + model_activate=( + ModelActivateOutput(**bot_input.model_activate.model_dump()) + if bot_input.model_activate + else None + ) ) @@ -361,6 +374,11 @@ def modify_owned_bot( if modify_input.bedrock_guardrails else None ), + model_activate=( + ModelActivateModel(**modify_input.model_activate.model_dump()) + if modify_input.model_activate + else None + ) ) return BotModifyOutput( @@ -404,6 +422,11 @@ def modify_owned_bot( if modify_input.bedrock_guardrails else None ), + model_activate=( + ModelActivateOutput(**modify_input.model_activate.model_dump()) + if modify_input.model_activate + else None + ) ) @@ -599,6 +622,18 @@ def fetch_all_bots( def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: try: bot = find_private_bot_by_id(user_id, bot_id) + + model_activate = None + if bot.model_activate: + model_activate = ModelActivateOutput( + claude3_sonnet_v1=bot.model_activate.claude3_sonnet_v1, + claude3_haiku_v1=bot.model_activate.claude3_haiku_v1, + claude3_opus_v1=bot.model_activate.claude3_opus_v1, + claude3_5_sonnet_v1=bot.model_activate.claude3_5_sonnet_v1, + claude3_5_sonnet_v2=bot.model_activate.claude3_5_sonnet_v2, + claude3_5_haiku_v1=bot.model_activate.claude3_5_haiku_v1 + ) + return BotSummaryOutput( id=bot_id, title=bot.title, @@ -618,6 +653,7 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: ) for starter in bot.conversation_quick_starters ], + model_activate=model_activate, ) except RecordNotFoundError: diff --git a/frontend/src/@types/bot.d.ts b/frontend/src/@types/bot.d.ts index b2fd83418..632e449af 100644 --- a/frontend/src/@types/bot.d.ts +++ b/frontend/src/@types/bot.d.ts @@ -2,6 +2,15 @@ import { BedrockKnowledgeBase } from '../features/knowledgeBase/types'; export type BotKind = 'private' | 'mixed'; +export type ModelActivate = { + claude3SonnetV1: boolean; + claude3HaikuV1: boolean; + claude3OpusV1: boolean; + claude35SonnetV1: boolean; + claude35SonnetV2: boolean; + claude35HaikuV1: boolean; +}; + export type BotMeta = { id: string; title: string; @@ -74,12 +83,14 @@ export type BotDetails = BotMeta & { conversationQuickStarters: ConversationQuickStarter[]; bedrockGuardrails: GuardrailsParams; bedrockKnowledgeBase: BedrockKnowledgeBase; + modelActivate: ModelActivate; }; export type BotSummary = BotMeta & { hasKnowledge: boolean; hasAgent: boolean; conversationQuickStarters: ConversationQuickStarter[]; + modelActivate: ModelActivate; }; export type BotFile = { @@ -101,6 +112,7 @@ export type RegisterBotRequest = { conversationQuickStarters: ConversationQuickStarter[]; bedrockGuardrails?: GuardrailsParams; bedrockKnowledgeBase?: BedrockKnowledgeBase; + modelActivate?: ModelActivate; }; export type RegisterBotResponse = BotDetails; @@ -116,6 +128,7 @@ export type UpdateBotRequest = { conversationQuickStarters: ConversationQuickStarter[]; bedrockGuardrails?: GuardrailsParams; bedrockKnowledgeBase?: BedrockKnowledgeBase; + modelActivate?: ModelActivate; }; export type UpdateBotResponse = { @@ -128,6 +141,7 @@ export type UpdateBotResponse = { displayRetrievedChunks: boolean; conversationQuickStarters: ConversationQuickStarter[]; bedrockKnowledgeBase: BedrockKnowledgeBase; + modelActivate: ModelActivate; }; export type UpdateBotPinnedRequest = { diff --git a/frontend/src/components/SwitchBedrockModel.stories.tsx b/frontend/src/components/SwitchBedrockModel.stories.tsx index 42a9c1cbe..daf677651 100644 --- a/frontend/src/components/SwitchBedrockModel.stories.tsx +++ b/frontend/src/components/SwitchBedrockModel.stories.tsx @@ -1,3 +1,10 @@ import SwitchBedrockModel from './SwitchBedrockModel'; -export const Ideal = () => ; +export const Ideal = () => ; diff --git a/frontend/src/components/SwitchBedrockModel.tsx b/frontend/src/components/SwitchBedrockModel.tsx index b1548bd18..545a53013 100644 --- a/frontend/src/components/SwitchBedrockModel.tsx +++ b/frontend/src/components/SwitchBedrockModel.tsx @@ -2,20 +2,36 @@ import { BaseProps } from '../@types/common'; import useModel from '../hooks/useModel'; import { Popover, Transition } from '@headlessui/react'; import { Fragment } from 'react/jsx-runtime'; -import { useMemo } from 'react'; +import { useMemo, useEffect } from 'react'; import { PiCaretDown, PiCheck } from 'react-icons/pi'; +import { ModelActivate } from '../@types/bot'; -type Props = BaseProps; +interface Props extends BaseProps { + modelActivate: ModelActivate; +} const SwitchBedrockModel: React.FC = (props) => { - const { availableModels, modelId, setModelId } = useModel(); + const { availableModels: allModels, modelId, setModelId } = useModel(); + + const availableModels = useMemo(() => { + return allModels.filter(model => { + const key = model.modelActivateKey as keyof ModelActivate; + return props.modelActivate[key] === true; + }); + }, [allModels, props.modelActivate]); const modelName = useMemo(() => { - return ( - availableModels.find((model) => model.modelId === modelId)?.label ?? '' - ); + return availableModels.find((model) => model.modelId === modelId)?.label ?? ''; }, [availableModels, modelId]); + useEffect(() => { + if (availableModels.length > 0 && !availableModels.some(m => m.modelId === modelId)) { + setModelId(availableModels[0].modelId); + } + console.log(availableModels) + console.log(props.modelActivate) + }, [availableModels, modelId, setModelId]); + return (
@@ -26,8 +42,7 @@ const SwitchBedrockModel: React.FC = (props) => { props.className ?? '' } group inline-flex w-auto whitespace-nowrap rounded border-aws-squid-ink/50 bg-aws-paper p-2 px-3 text-base hover:brightness-75`}>
- {modelName} - + {modelName}
@@ -39,13 +54,13 @@ const SwitchBedrockModel: React.FC = (props) => { leave="transition ease-in duration-150" leaveFrom="opacity-100 translate-y-0" leaveTo="opacity-0 translate-y-1"> - +
{availableModels.map((model) => (
{ setModelId(model.modelId); }}> @@ -60,17 +75,19 @@ const SwitchBedrockModel: React.FC = (props) => {
- {model.label} -
-
- {model.description} + {model.label}
+ {model.description && ( +
+ {model.description} +
+ )}
))}
- + )} diff --git a/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx b/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx index 7bd0f71a0..e5969c977 100644 --- a/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx +++ b/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx @@ -13,7 +13,7 @@ import Alert from '../../../components/Alert'; import KnowledgeFileUploader from '../../../components/KnowledgeFileUploader'; import GenerationConfig from '../../../components/GenerationConfig'; import Select from '../../../components/Select'; -import { BotFile, ConversationQuickStarter } from '../../../@types/bot'; +import { BotFile, ConversationQuickStarter, ModelActivate } from '../../../@types/bot'; import { ParsingModel } from '../types'; import { ulid } from 'ulid'; @@ -124,6 +124,45 @@ const BotKbEditPage: React.FC = () => { const [guardrailVersion, setGuardrailVersion] = useState(''); const [parsingModel, setParsingModel] = useState(undefined); + const [modelActivate, setModelActivate] = useState({ + claude3SonnetV1: true, + claude3HaikuV1: true, + claude3OpusV1: true, + claude35SonnetV1: true, + claude35SonnetV2: true, + claude35HaikuV1: true, + }); + + const modelActivateOptions: { + key: string, + label: string + }[] = [ + { + key: 'claude3SonnetV1', + label: t('model.sonnet3.label') + }, + { + key: 'claude3HaikuV1', + label: t("model.haiku3.label") + }, + { + key: 'claude3OpusV1', + label: t("model.opus3.label") + }, + { + key: 'claude35SonnetV1', + label: t('model.sonnet3-5.label') + }, + { + key: 'claude35SonnetV2', + label: t('model.sonnet3-5-v2.label') + }, + { + key: 'claude35HaikuV1', + label: t('model.haiku3-5.label') + } + ] + const embeddingsModelOptions: { label: string; value: EmbeddingsModel; @@ -391,6 +430,7 @@ const BotKbEditPage: React.FC = () => { : 0 ); setParsingModel(bot.bedrockKnowledgeBase.parsingModel); + setModelActivate(bot.modelActivate) }) .finally(() => { setIsLoading(false); @@ -405,6 +445,19 @@ const BotKbEditPage: React.FC = () => { return pattern.test(syncErrorMessage); }, []); + const onChangeModelActivate = useCallback( + (key: string, value: boolean) => { + setModelActivate(prevState => { + const newState = { + ...prevState, + [key]: value + }; + return newState; + }); + }, + [] + ); + const onChangeS3Url = useCallback( (s3Url: string, idx: number) => { setS3Urls( @@ -927,6 +980,7 @@ const BotKbEditPage: React.FC = () => { guardrailArn: '', guardrailVersion: '', }, + modelActivate, }) .then(() => { navigate('/bot/explore'); @@ -969,6 +1023,7 @@ const BotKbEditPage: React.FC = () => { groundingThreshold, relevanceThreshold, parsingModel, + modelActivate, ]); const onClickEdit = useCallback(() => { @@ -1044,6 +1099,7 @@ const BotKbEditPage: React.FC = () => { guardrailArn: guardrailArn, guardrailVersion: guardrailVersion, }, + modelActivate, }) .then(() => { navigate('/bot/explore'); @@ -1092,6 +1148,7 @@ const BotKbEditPage: React.FC = () => { guardrailArn, guardrailVersion, parsingModel, + modelActivate, ]); const [isOpenSamples, setIsOpenSamples] = useState(false); @@ -1929,6 +1986,29 @@ const BotKbEditPage: React.FC = () => { + +
+ {t('bot.modelActivate.description')} +
+ +
+
+ {modelActivateOptions.map(({ key, label }) => ( +
+ onChangeModelActivate(key, value)} + /> + {label} +
+ ))} +
+
+
+ {errorMessages['syncChunkError'] && ( { label: string; supportMediaType: string[]; description?: string; + modelActivateKey: string; }[] >(() => { return !MISTRAL_ENABLED @@ -44,36 +45,42 @@ const useModel = () => { label: t('model.haiku3.label'), description: t('model.haiku3.description'), supportMediaType: CLAUDE_SUPPORTED_MEDIA_TYPES, + modelActivateKey: 'claude3HaikuV1', }, { modelId: 'claude-v3.5-haiku', label: t('model.haiku3-5.label'), description: t('model.haiku3-5.description'), supportMediaType: CLAUDE_SUPPORTED_MEDIA_TYPES, + modelActivateKey: 'claude35HaikuV1' }, { modelId: 'claude-v3-sonnet', label: t('model.sonnet3.label'), description: t('model.sonnet3.description'), supportMediaType: CLAUDE_SUPPORTED_MEDIA_TYPES, + modelActivateKey: 'claude3SonnetV1' }, { modelId: 'claude-v3.5-sonnet', label: t('model.sonnet3-5.label'), description: t('model.sonnet3-5.description'), supportMediaType: CLAUDE_SUPPORTED_MEDIA_TYPES, + modelActivateKey: 'claude35SonnetV1' }, { modelId: 'claude-v3.5-sonnet-v2', label: t('model.sonnet3-5-v2.label'), description: t('model.sonnet3-5-v2.description'), supportMediaType: CLAUDE_SUPPORTED_MEDIA_TYPES, + modelActivateKey: 'claude35SonnetV2' }, { modelId: 'claude-v3-opus', label: t('model.opus3.label'), description: t('model.opus3.description'), supportMediaType: CLAUDE_SUPPORTED_MEDIA_TYPES, + modelActivateKey: 'claude3OpusV1' }, ] : [ @@ -81,16 +88,19 @@ const useModel = () => { modelId: 'mistral-7b-instruct', label: t('model.mistral7b.label'), supportMediaType: [], + modelActivateKey: 'mistral7b' }, { modelId: 'mixtral-8x7b-instruct', label: t('model.mistral8x7b.label'), supportMediaType: [], + modelActivateKey: 'mistral8x7b' }, { modelId: 'mistral-large', label: t('model.mistralLarge.label'), supportMediaType: [], + modelActivateKey: 'mistralLarge' }, ]; }, [t]); diff --git a/frontend/src/i18n/en/index.ts b/frontend/src/i18n/en/index.ts index e194fabc0..f212d060b 100644 --- a/frontend/src/i18n/en/index.ts +++ b/frontend/src/i18n/en/index.ts @@ -36,7 +36,7 @@ const translation = { 'The latest version of Claude 3.5. An enhanced model that builds on v1 with higher accuracy and performance.', }, 'haiku3-5': { - label: 'Claude 3.5 (Haiku)', + label: 'Claude 3.5 (Haiku) v1', description: 'The latest version, offering even faster responsiveness and improved capabilities over Haiku 3.', }, @@ -346,6 +346,10 @@ How would you categorize this email?`, duplicatedFile: 'A file with the same name has been uploaded.', failDeleteApi: 'Failed to delete the API.', }, + modelActivate: { + title: 'Model Activation', + description: 'Configure which AI models can be used with this bot.' + }, }, admin: { sharedBotAnalytics: { diff --git a/frontend/src/i18n/ja/index.ts b/frontend/src/i18n/ja/index.ts index 196d62435..25c54d8eb 100644 --- a/frontend/src/i18n/ja/index.ts +++ b/frontend/src/i18n/ja/index.ts @@ -39,7 +39,7 @@ const translation = { 'Claude 3.5の最新バージョン。v1をさらに強化し、より高い精度とパフォーマンスを提供', }, 'haiku3-5': { - label: 'Claude 3.5 (Haiku)', + label: 'Claude 3.5 (Haiku) v1', description: 'Haiku最新バージョン。精度を保ち、高速な応答を実現', }, opus3: { @@ -349,6 +349,10 @@ const translation = { '同一ファイル名のファイルが既にアップロードされています。', failDeleteApi: 'APIの削除に失敗しました。', }, + modelActivate: { + title: 'モデル設定', + description: 'このボットで使用可能なモデルを設定します。', + }, }, admin: { sharedBotAnalytics: { diff --git a/frontend/src/pages/ChatPage.tsx b/frontend/src/pages/ChatPage.tsx index 7b7656bd8..22cfbc45a 100644 --- a/frontend/src/pages/ChatPage.tsx +++ b/frontend/src/pages/ChatPage.tsx @@ -29,6 +29,7 @@ import useBot from '../hooks/useBot'; import useConversation from '../hooks/useConversation'; import ButtonPopover from '../components/PopoverMenu'; import PopoverItem from '../components/PopoverItem'; +import { ModelActivate } from '../@types/bot'; import { copyBotUrl } from '../utils/BotUtils'; import { produce } from 'immer'; @@ -51,6 +52,16 @@ import { convertThinkingLogToAgentToolProps } from '../features/agent/utils/Agen const MISTRAL_ENABLED: boolean = import.meta.env.VITE_APP_ENABLE_MISTRAL === 'true'; +// Default model activation settings when no bot is selected +const defaultModelActivate: ModelActivate = { + claude3SonnetV1: true, + claude3HaikuV1: true, + claude35SonnetV1: true, + claude35SonnetV2: true, + claude35HaikuV1: true, + claude3OpusV1: true, +}; + const ChatPage: React.FC = () => { const { t } = useTranslation(); const navigate = useNavigate(); @@ -361,6 +372,11 @@ const ChatPage: React.FC = () => { ); }); + const modelActivate = useMemo(() => { + console.log(`bot: ${JSON.stringify(bot)}`) + return bot?.modelActivate ?? defaultModelActivate; + }, [bot, bot?.modelActivate]); + return (
{ {messages?.length === 0 ? (
{!loadingConversation && ( - + )}
{!MISTRAL_ENABLED From 7cf53745d3613531214180da468b36e585fb01c6 Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Thu, 21 Nov 2024 02:23:33 +0000 Subject: [PATCH 02/34] =?UTF-8?q?=E3=83=AD=E3=82=B0=E5=87=BA=E5=8A=9B?= =?UTF-8?q?=E3=81=AE=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/SwitchBedrockModel.tsx | 2 -- frontend/src/pages/ChatPage.tsx | 1 - 2 files changed, 3 deletions(-) diff --git a/frontend/src/components/SwitchBedrockModel.tsx b/frontend/src/components/SwitchBedrockModel.tsx index 545a53013..7081a989d 100644 --- a/frontend/src/components/SwitchBedrockModel.tsx +++ b/frontend/src/components/SwitchBedrockModel.tsx @@ -28,8 +28,6 @@ const SwitchBedrockModel: React.FC = (props) => { if (availableModels.length > 0 && !availableModels.some(m => m.modelId === modelId)) { setModelId(availableModels[0].modelId); } - console.log(availableModels) - console.log(props.modelActivate) }, [availableModels, modelId, setModelId]); return ( diff --git a/frontend/src/pages/ChatPage.tsx b/frontend/src/pages/ChatPage.tsx index 22cfbc45a..29f1f8588 100644 --- a/frontend/src/pages/ChatPage.tsx +++ b/frontend/src/pages/ChatPage.tsx @@ -373,7 +373,6 @@ const ChatPage: React.FC = () => { }); const modelActivate = useMemo(() => { - console.log(`bot: ${JSON.stringify(bot)}`) return bot?.modelActivate ?? defaultModelActivate; }, [bot, bot?.modelActivate]); From 71dd638e681df7d72c48e53cc8c0d017b25b6ed9 Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Fri, 22 Nov 2024 08:35:14 +0000 Subject: [PATCH 03/34] model configration --- backend/app/repositories/custom_bot.py | 28 ++++- backend/app/repositories/models/custom_bot.py | 1 + backend/app/usecases/bot.py | 52 +++++--- backend/app/usecases/chat.py | 1 + .../src/components/SwitchBedrockModel.tsx | 3 +- frontend/src/hooks/useModel.ts | 115 ++++++++++++++++-- frontend/src/pages/ChatPage.tsx | 6 +- 7 files changed, 174 insertions(+), 32 deletions(-) diff --git a/backend/app/repositories/custom_bot.py b/backend/app/repositories/custom_bot.py index 4442e5f58..e34e534ba 100644 --- a/backend/app/repositories/custom_bot.py +++ b/backend/app/repositories/custom_bot.py @@ -89,8 +89,9 @@ def store_bot(user_id: str, custom_bot: BotModel): "ConversationQuickStarters": [ starter.model_dump() for starter in custom_bot.conversation_quick_starters ], - "ModelActivate": custom_bot.model_activate.model_dump(), } + if custom_bot.model_activate is not None: + item["ModelActivate"] = custom_bot.model_activate.model_dump() if custom_bot.bedrock_knowledge_base: item["BedrockKnowledgeBase"] = custom_bot.bedrock_knowledge_base.model_dump() if custom_bot.bedrock_guardrails: @@ -202,11 +203,35 @@ def store_alias(user_id: str, alias: BotAliasModel): "ConversationQuickStarters": [ starter.model_dump() for starter in alias.conversation_quick_starters ], + "ModelActivate": alias.model_activate.model_dump() if alias.model_activate else None, } response = table.put_item(Item=item) return response +def update_bot_model_activate( + user_id: str, + bot: BotModel +): + """Update bot model activate.""" + table = _get_table_client(user_id) + logger.info(f"Updating bot model activate: {bot.id}") + + try: + response = table.update_item( + Key={"PK": user_id, "SK": compose_bot_alias_id(user_id, bot.id)}, + UpdateExpression="SET ModelActivate = :val", + ExpressionAttributeValues={":val": bot.model_activate.model_dump()}, + ConditionExpression="attribute_exists(PK) AND attribute_exists(SK)", + ) + print(f"update_bot_model_activate response: {response}") + except ClientError as e: + if e.response["Error"]["Code"] == "ConditionalCheckFailedException": + raise RecordNotFoundError(f"Alias with id {bot.id} not found") + else: + raise e + + return response def update_bot_last_used_time(user_id: str, bot_id: str): """Update last used time for bot.""" @@ -611,6 +636,7 @@ def find_alias_by_id(user_id: str, alias_id: str) -> BotAliasModel: has_knowledge=item["HasKnowledge"], has_agent=item.get("HasAgent", False), conversation_quick_starters=item.get("ConversationQuickStarters", []), + model_activate=item.get("ModelActivate", None), ) logger.info(f"Found alias: {bot}") diff --git a/backend/app/repositories/models/custom_bot.py b/backend/app/repositories/models/custom_bot.py index 8d77a816b..49455097c 100644 --- a/backend/app/repositories/models/custom_bot.py +++ b/backend/app/repositories/models/custom_bot.py @@ -116,6 +116,7 @@ class BotAliasModel(BaseModel): has_knowledge: bool has_agent: bool conversation_quick_starters: list[ConversationQuickStarterModel] + model_activate: ModelActivateModel | None class BotMeta(BaseModel): diff --git a/backend/app/usecases/bot.py b/backend/app/usecases/bot.py index 5797535ae..bee198a5d 100644 --- a/backend/app/usecases/bot.py +++ b/backend/app/usecases/bot.py @@ -25,6 +25,7 @@ update_bot, update_bot_last_used_time, update_bot_pin_status, + update_bot_model_activate, ) from app.repositories.models.custom_bot import ( AgentModel, @@ -52,8 +53,7 @@ GenerationParams, Knowledge, type_sync_status, - ModelActivateInput, - ModelActivateOutput + ModelActivateOutput, ) from app.routes.schemas.bot_guardrails import BedrockGuardrailsOutput from app.routes.schemas.bot_kb import BedrockKnowledgeBaseOutput @@ -210,7 +210,7 @@ def create_new_bot(user_id: str, bot_input: BotInput) -> BotOutput: ModelActivateModel(**bot_input.model_activate.model_dump()) if bot_input.model_activate else None - ) + ), ), ) return BotOutput( @@ -267,7 +267,7 @@ def create_new_bot(user_id: str, bot_input: BotInput) -> BotOutput: ModelActivateOutput(**bot_input.model_activate.model_dump()) if bot_input.model_activate else None - ) + ), ) @@ -378,7 +378,7 @@ def modify_owned_bot( ModelActivateModel(**modify_input.model_activate.model_dump()) if modify_input.model_activate else None - ) + ), ) return BotModifyOutput( @@ -426,7 +426,7 @@ def modify_owned_bot( ModelActivateOutput(**modify_input.model_activate.model_dump()) if modify_input.model_activate else None - ) + ), ) @@ -545,6 +545,7 @@ def fetch_all_bots_by_user_id( has_knowledge=bot.has_knowledge(), has_agent=bot.is_agent_enabled(), conversation_quick_starters=bot.conversation_quick_starters, + model_activate=bot.model_activate, ), ) @@ -622,18 +623,6 @@ def fetch_all_bots( def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: try: bot = find_private_bot_by_id(user_id, bot_id) - - model_activate = None - if bot.model_activate: - model_activate = ModelActivateOutput( - claude3_sonnet_v1=bot.model_activate.claude3_sonnet_v1, - claude3_haiku_v1=bot.model_activate.claude3_haiku_v1, - claude3_opus_v1=bot.model_activate.claude3_opus_v1, - claude3_5_sonnet_v1=bot.model_activate.claude3_5_sonnet_v1, - claude3_5_sonnet_v2=bot.model_activate.claude3_5_sonnet_v2, - claude3_5_haiku_v1=bot.model_activate.claude3_5_haiku_v1 - ) - return BotSummaryOutput( id=bot_id, title=bot.title, @@ -653,7 +642,11 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: ) for starter in bot.conversation_quick_starters ], - model_activate=model_activate, + model_activate=( + ModelActivateOutput(**bot.model_activate.model_dump()) + if bot.model_activate + else None + ), ) except RecordNotFoundError: @@ -661,6 +654,11 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: try: alias = find_alias_by_id(user_id, bot_id) + + # update bot model activate if alias is found. + bot = find_public_bot_by_id(bot_id) + update_bot_model_activate(user_id, bot) + return BotSummaryOutput( id=alias.id, title=alias.title, @@ -684,6 +682,12 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: for starter in alias.conversation_quick_starters ] ), + # Update with bot.model_activate parameters + model_activate=( + ModelActivateOutput(**bot.model_activate.model_dump()) + if bot.model_activate + else None + ), ) except RecordNotFoundError: pass @@ -713,6 +717,11 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: ) for starter in bot.conversation_quick_starters ], + model_activate=( + ModelActivateModel(**bot.model_activate.model_dump()) + if bot.model_activate + else None + ), ), ) return BotSummaryOutput( @@ -734,6 +743,11 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: ) for starter in bot.conversation_quick_starters ], + model_activate=( + ModelActivateModel(**bot.model_activate.model_dump()) + if bot.model_activate + else None + ), ) except RecordNotFoundError: raise RecordNotFoundError( diff --git a/backend/app/usecases/chat.py b/backend/app/usecases/chat.py index 74ecaf207..e643f1736 100644 --- a/backend/app/usecases/chat.py +++ b/backend/app/usecases/chat.py @@ -161,6 +161,7 @@ def prepare_conversation( for starter in bot.conversation_quick_starters ] ), + model_activate=bot.model_activate, ), ) diff --git a/frontend/src/components/SwitchBedrockModel.tsx b/frontend/src/components/SwitchBedrockModel.tsx index 7081a989d..14d60e7f2 100644 --- a/frontend/src/components/SwitchBedrockModel.tsx +++ b/frontend/src/components/SwitchBedrockModel.tsx @@ -8,10 +8,11 @@ import { ModelActivate } from '../@types/bot'; interface Props extends BaseProps { modelActivate: ModelActivate; + botId?: string | null; } const SwitchBedrockModel: React.FC = (props) => { - const { availableModels: allModels, modelId, setModelId } = useModel(); + const { availableModels: allModels, modelId, setModelId } = useModel(props.botId, props.modelActivate); const availableModels = useMemo(() => { return allModels.filter(model => { diff --git a/frontend/src/hooks/useModel.ts b/frontend/src/hooks/useModel.ts index 24966edeb..4e6d5861d 100644 --- a/frontend/src/hooks/useModel.ts +++ b/frontend/src/hooks/useModel.ts @@ -1,8 +1,9 @@ import { create } from 'zustand'; import { Model } from '../@types/conversation'; -import { useEffect, useMemo } from 'react'; +import { useEffect, useMemo, useCallback, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; import useLocalStorage from './useLocalStorage'; +import { ModelActivate } from '../@types/bot'; const MISTRAL_ENABLED: boolean = import.meta.env.VITE_APP_ENABLE_MISTRAL === 'true'; @@ -26,8 +27,22 @@ const useModelState = create<{ }, })); -const useModel = () => { +const DEFAULT_MODEL: Model = 'claude-v3-haiku'; + +// Store the Previous BotId +const usePreviousBotId = (botId: string | null | undefined) => { + const ref = useRef(); + + useEffect(() => { + ref.current = botId; + }, [botId]); + + return ref.current; +}; + +const useModel = (botId?: string | null, modelActivate?: ModelActivate) => { const { t } = useTranslation(); + const previousBotId = usePreviousBotId(botId); const availableModels = useMemo< { @@ -105,25 +120,105 @@ const useModel = () => { ]; }, [t]); + const [filteredModels, setFilteredModels] = useState(availableModels); const { modelId, setModelId } = useModelState(); const [recentUseModelId, setRecentUseModelId] = useLocalStorage( 'recentUseModelId', - 'claude-v3-haiku' + DEFAULT_MODEL ); + + // Save the model id by each bot + const [botModelId, setBotModelId] = useLocalStorage( + botId ? `bot_model_${botId}` : 'temp_model', + '' + ); + + // Update filtered models when modelActivate changes useEffect(() => { - // Restored from LocalStorage - setModelId(recentUseModelId as Model); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + if (modelActivate !== undefined) { + const filtered = availableModels.filter(model => { + const key = model.modelActivateKey as keyof ModelActivate; + if (modelActivate) { + return modelActivate[key] === true; + } else { + return true; + } + }); + setFilteredModels(filtered); + } + }, [modelActivate, availableModels]); + + + const getDefaultModel = useCallback(() => { + // check default model is available + const defaultModelAvailable = filteredModels.some(m => m.modelId === DEFAULT_MODEL); + if (defaultModelAvailable) { + return DEFAULT_MODEL; + } + // If the default model is not available, select the first model on the list + return filteredModels[0]?.modelId ?? DEFAULT_MODEL; + }, [filteredModels]); + + // select the model via list of modelActivate + const selectModel = useCallback((targetModelId: Model) => { + const model = filteredModels.find(m => m.modelId === targetModelId); + return model ? targetModelId : getDefaultModel(); + }, [filteredModels, getDefaultModel]); + + useEffect(() => { + if (modelActivate === undefined) {return} + + // botId is changed + if (previousBotId !== botId) { + + // BotId is undefined, select recent modelId + if (!botId) { + setModelId(selectModel(recentUseModelId as Model)); + return; + } + + // get botModelId from localStorage + // When acquired from botModelID, settings for previousBotID are acquired, so a key is specified and acquired directly from local storage. + const botModelId = localStorage.getItem(`bot_model_${botId}`); + + // modelId is in the the LocalStorage. use the saved modelId. + if (botModelId) { + setModelId(selectModel(botModelId as Model)); + } else { + // If there is no bot-specific model ID, check if the last model used can be used + const lastModelAvailable = filteredModels.some(m => m.modelId === recentUseModelId); + + // If the last model used is available, use it. + if (lastModelAvailable) { + setModelId(selectModel(recentUseModelId as Model)); + return; + }else{ + // Use the default model if not available + setModelId(selectModel(getDefaultModel())); + } + } + }else{ + // Processing when botId and previousBotID are the same, but there is an update in FilteredModels + if (botId) { + const lastModelAvailable = filteredModels.some(m => m.modelId === recentUseModelId); + if (!lastModelAvailable) { + setModelId(selectModel(getDefaultModel())); + } + } + } + }, [botId, previousBotId, botModelId, recentUseModelId, modelId, filteredModels, setModelId, selectModel, getDefaultModel]); const model = useMemo(() => { - return availableModels.find((model) => model.modelId === modelId); - }, [availableModels, modelId]); + return filteredModels.find((model) => model.modelId === modelId); + }, [filteredModels, modelId]); return { modelId, setModelId: (model: Model) => { setRecentUseModelId(model); + if (botId) { + setBotModelId(model); + } setModelId(model); }, model, @@ -133,7 +228,7 @@ const useModel = () => { const ext = mediaType.split('/')[1]; return ext === 'jpeg' ? ['.jpg', '.jpeg'] : [`.${ext}`]; }) ?? [], - availableModels, + availableModels: filteredModels, }; }; diff --git a/frontend/src/pages/ChatPage.tsx b/frontend/src/pages/ChatPage.tsx index 29f1f8588..945588c18 100644 --- a/frontend/src/pages/ChatPage.tsx +++ b/frontend/src/pages/ChatPage.tsx @@ -450,7 +450,11 @@ const ChatPage: React.FC = () => { {messages?.length === 0 ? (
{!loadingConversation && ( - + )}
{!MISTRAL_ENABLED From d2f522d01aaa8ad987812aa5125481e24d3dd6a3 Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Fri, 22 Nov 2024 08:46:14 +0000 Subject: [PATCH 04/34] fix ci error --- backend/app/repositories/custom_bot.py | 17 ++++++++++------- backend/app/routes/bot.py | 2 +- backend/app/routes/schemas/bot.py | 1 + backend/app/usecases/bot.py | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/backend/app/repositories/custom_bot.py b/backend/app/repositories/custom_bot.py index e34e534ba..10cecf271 100644 --- a/backend/app/repositories/custom_bot.py +++ b/backend/app/repositories/custom_bot.py @@ -203,16 +203,16 @@ def store_alias(user_id: str, alias: BotAliasModel): "ConversationQuickStarters": [ starter.model_dump() for starter in alias.conversation_quick_starters ], - "ModelActivate": alias.model_activate.model_dump() if alias.model_activate else None, + "ModelActivate": ( + alias.model_activate.model_dump() if alias.model_activate else None + ), } response = table.put_item(Item=item) return response -def update_bot_model_activate( - user_id: str, - bot: BotModel -): + +def update_bot_model_activate(user_id: str, bot: BotModel): """Update bot model activate.""" table = _get_table_client(user_id) logger.info(f"Updating bot model activate: {bot.id}") @@ -221,7 +221,9 @@ def update_bot_model_activate( response = table.update_item( Key={"PK": user_id, "SK": compose_bot_alias_id(user_id, bot.id)}, UpdateExpression="SET ModelActivate = :val", - ExpressionAttributeValues={":val": bot.model_activate.model_dump()}, + ExpressionAttributeValues={ + ":val": bot.model_activate.model_dump() if bot.model_activate else None + }, ConditionExpression="attribute_exists(PK) AND attribute_exists(SK)", ) print(f"update_bot_model_activate response: {response}") @@ -229,10 +231,11 @@ def update_bot_model_activate( if e.response["Error"]["Code"] == "ConditionalCheckFailedException": raise RecordNotFoundError(f"Alias with id {bot.id} not found") else: - raise e + raise e return response + def update_bot_last_used_time(user_id: str, bot_id: str): """Update last used time for bot.""" table = _get_table_client(user_id) diff --git a/backend/app/routes/bot.py b/backend/app/routes/bot.py index d795d1da3..9b1cbe044 100644 --- a/backend/app/routes/bot.py +++ b/backend/app/routes/bot.py @@ -157,7 +157,7 @@ def get_private_bot(request: Request, bot_id: str): ModelActivateOutput(**bot.model_activate.model_dump()) if bot.model_activate else None - ) + ), ) return output diff --git a/backend/app/routes/schemas/bot.py b/backend/app/routes/schemas/bot.py index f6d439468..ffdb7c542 100644 --- a/backend/app/routes/schemas/bot.py +++ b/backend/app/routes/schemas/bot.py @@ -27,6 +27,7 @@ "ORIGINAL_NOT_FOUND", ] + class ModelActivateInput(BaseSchema): claude3_sonnet_v1: bool = True claude3_haiku_v1: bool = True diff --git a/backend/app/usecases/bot.py b/backend/app/usecases/bot.py index bee198a5d..e585acc58 100644 --- a/backend/app/usecases/bot.py +++ b/backend/app/usecases/bot.py @@ -744,7 +744,7 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: for starter in bot.conversation_quick_starters ], model_activate=( - ModelActivateModel(**bot.model_activate.model_dump()) + ModelActivateOutput(**bot.model_activate.model_dump()) if bot.model_activate else None ), From c098c5588c0e332a99316fe7200d002872c9abb5 Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Fri, 22 Nov 2024 14:46:34 +0000 Subject: [PATCH 05/34] =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E3=82=B3?= =?UTF-8?q?=E3=83=BC=E3=83=89=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/poetry.lock | 385 +++++++++++++++++- backend/pyproject.toml | 1 + .../test_repositories/test_conversation.py | 347 ++++++++++------ 3 files changed, 611 insertions(+), 122 deletions(-) diff --git a/backend/poetry.lock b/backend/poetry.lock index 769104bb7..0419831f9 100644 --- a/backend/poetry.lock +++ b/backend/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. [[package]] name = "annotated-types" @@ -146,6 +146,85 @@ files = [ {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, ] +[[package]] +name = "cffi" +version = "1.17.1" +description = "Foreign Function Interface for Python calling C code." +optional = false +python-versions = ">=3.8" +files = [ + {file = "cffi-1.17.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14"}, + {file = "cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:edae79245293e15384b51f88b00613ba9f7198016a5948b5dddf4917d4d26382"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45398b671ac6d70e67da8e4224a065cec6a93541bb7aebe1b198a61b58c7b702"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ad9413ccdeda48c5afdae7e4fa2192157e991ff761e7ab8fdd8926f40b160cc3"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5da5719280082ac6bd9aa7becb3938dc9f9cbd57fac7d2871717b1feb0902ab6"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bb1a08b8008b281856e5971307cc386a8e9c5b625ac297e853d36da6efe9c17"}, + {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:045d61c734659cc045141be4bae381a41d89b741f795af1dd018bfb532fd0df8"}, + {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6883e737d7d9e4899a8a695e00ec36bd4e5e4f18fabe0aca0efe0a4b44cdb13e"}, + {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:6b8b4a92e1c65048ff98cfe1f735ef8f1ceb72e3d5f0c25fdb12087a23da22be"}, + {file = "cffi-1.17.1-cp310-cp310-win32.whl", hash = "sha256:c9c3d058ebabb74db66e431095118094d06abf53284d9c81f27300d0e0d8bc7c"}, + {file = "cffi-1.17.1-cp310-cp310-win_amd64.whl", hash = "sha256:0f048dcf80db46f0098ccac01132761580d28e28bc0f78ae0d58048063317e15"}, + {file = "cffi-1.17.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a45e3c6913c5b87b3ff120dcdc03f6131fa0065027d0ed7ee6190736a74cd401"}, + {file = "cffi-1.17.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:30c5e0cb5ae493c04c8b42916e52ca38079f1b235c2f8ae5f4527b963c401caf"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f75c7ab1f9e4aca5414ed4d8e5c0e303a34f4421f8a0d47a4d019ceff0ab6af4"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1ed2dd2972641495a3ec98445e09766f077aee98a1c896dcb4ad0d303628e41"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:46bf43160c1a35f7ec506d254e5c890f3c03648a4dbac12d624e4490a7046cd1"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a24ed04c8ffd54b0729c07cee15a81d964e6fee0e3d4d342a27b020d22959dc6"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:610faea79c43e44c71e1ec53a554553fa22321b65fae24889706c0a84d4ad86d"}, + {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a9b15d491f3ad5d692e11f6b71f7857e7835eb677955c00cc0aefcd0669adaf6"}, + {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:de2ea4b5833625383e464549fec1bc395c1bdeeb5f25c4a3a82b5a8c756ec22f"}, + {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b"}, + {file = "cffi-1.17.1-cp311-cp311-win32.whl", hash = "sha256:85a950a4ac9c359340d5963966e3e0a94a676bd6245a4b55bc43949eee26a655"}, + {file = "cffi-1.17.1-cp311-cp311-win_amd64.whl", hash = "sha256:caaf0640ef5f5517f49bc275eca1406b0ffa6aa184892812030f04c2abf589a0"}, + {file = "cffi-1.17.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:805b4371bf7197c329fcb3ead37e710d1bca9da5d583f5073b799d5c5bd1eee4"}, + {file = "cffi-1.17.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:733e99bc2df47476e3848417c5a4540522f234dfd4ef3ab7fafdf555b082ec0c"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1257bdabf294dceb59f5e70c64a3e2f462c30c7ad68092d01bbbfb1c16b1ba36"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da95af8214998d77a98cc14e3a3bd00aa191526343078b530ceb0bd710fb48a5"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d63afe322132c194cf832bfec0dc69a99fb9bb6bbd550f161a49e9e855cc78ff"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f79fc4fc25f1c8698ff97788206bb3c2598949bfe0fef03d299eb1b5356ada99"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b62ce867176a75d03a665bad002af8e6d54644fad99a3c70905c543130e39d93"}, + {file = "cffi-1.17.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:386c8bf53c502fff58903061338ce4f4950cbdcb23e2902d86c0f722b786bbe3"}, + {file = "cffi-1.17.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4ceb10419a9adf4460ea14cfd6bc43d08701f0835e979bf821052f1805850fe8"}, + {file = "cffi-1.17.1-cp312-cp312-win32.whl", hash = "sha256:a08d7e755f8ed21095a310a693525137cfe756ce62d066e53f502a83dc550f65"}, + {file = "cffi-1.17.1-cp312-cp312-win_amd64.whl", hash = "sha256:51392eae71afec0d0c8fb1a53b204dbb3bcabcb3c9b807eedf3e1e6ccf2de903"}, + {file = "cffi-1.17.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f3a2b4222ce6b60e2e8b337bb9596923045681d71e5a082783484d845390938e"}, + {file = "cffi-1.17.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d01b12eeeb4427d3110de311e1774046ad344f5b1a7403101878976ecd7a10f3"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:706510fe141c86a69c8ddc029c7910003a17353970cff3b904ff0686a5927683"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de55b766c7aa2e2a3092c51e0483d700341182f08e67c63630d5b6f200bb28e5"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c59d6e989d07460165cc5ad3c61f9fd8f1b4796eacbd81cee78957842b834af4"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd398dbc6773384a17fe0d3e7eeb8d1a21c2200473ee6806bb5e6a8e62bb73dd"}, + {file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed"}, + {file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9"}, + {file = "cffi-1.17.1-cp313-cp313-win32.whl", hash = "sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d"}, + {file = "cffi-1.17.1-cp313-cp313-win_amd64.whl", hash = "sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a"}, + {file = "cffi-1.17.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:636062ea65bd0195bc012fea9321aca499c0504409f413dc88af450b57ffd03b"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c7eac2ef9b63c79431bc4b25f1cd649d7f061a28808cbc6c47b534bd789ef964"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e221cf152cff04059d011ee126477f0d9588303eb57e88923578ace7baad17f9"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:31000ec67d4221a71bd3f67df918b1f88f676f1c3b535a7eb473255fdc0b83fc"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f17be4345073b0a7b8ea599688f692ac3ef23ce28e5df79c04de519dbc4912c"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2b1fac190ae3ebfe37b979cc1ce69c81f4e4fe5746bb401dca63a9062cdaf1"}, + {file = "cffi-1.17.1-cp38-cp38-win32.whl", hash = "sha256:7596d6620d3fa590f677e9ee430df2958d2d6d6de2feeae5b20e82c00b76fbf8"}, + {file = "cffi-1.17.1-cp38-cp38-win_amd64.whl", hash = "sha256:78122be759c3f8a014ce010908ae03364d00a1f81ab5c7f4a7a5120607ea56e1"}, + {file = "cffi-1.17.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b2ab587605f4ba0bf81dc0cb08a41bd1c0a5906bd59243d56bad7668a6fc6c16"}, + {file = "cffi-1.17.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:28b16024becceed8c6dfbc75629e27788d8a3f9030691a1dbf9821a128b22c36"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1d599671f396c4723d016dbddb72fe8e0397082b0a77a4fab8028923bec050e8"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca74b8dbe6e8e8263c0ffd60277de77dcee6c837a3d0881d8c1ead7268c9e576"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98e3969bcff97cae1b2def8ba499ea3d6f31ddfdb7635374834cf89a1a08ecf0"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cdf5ce3acdfd1661132f2a9c19cac174758dc2352bfe37d98aa7512c6b7178b3"}, + {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9755e4345d1ec879e3849e62222a18c7174d65a6a92d5b346b1863912168b595"}, + {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f1e22e8c4419538cb197e4dd60acc919d7696e5ef98ee4da4e01d3f8cfa4cc5a"}, + {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c03e868a0b3bc35839ba98e74211ed2b05d2119be4e8a0f224fba9384f1fe02e"}, + {file = "cffi-1.17.1-cp39-cp39-win32.whl", hash = "sha256:e31ae45bc2e29f6b2abd0de1cc3b9d5205aa847cafaecb8af1476a609a2f6eb7"}, + {file = "cffi-1.17.1-cp39-cp39-win_amd64.whl", hash = "sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662"}, + {file = "cffi-1.17.1.tar.gz", hash = "sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"}, +] + +[package.dependencies] +pycparser = "*" + [[package]] name = "charset-normalizer" version = "3.4.0" @@ -285,6 +364,55 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] +[[package]] +name = "cryptography" +version = "43.0.3" +description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." +optional = false +python-versions = ">=3.7" +files = [ + {file = "cryptography-43.0.3-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:bf7a1932ac4176486eab36a19ed4c0492da5d97123f1406cf15e41b05e787d2e"}, + {file = "cryptography-43.0.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63efa177ff54aec6e1c0aefaa1a241232dcd37413835a9b674b6e3f0ae2bfd3e"}, + {file = "cryptography-43.0.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e1ce50266f4f70bf41a2c6dc4358afadae90e2a1e5342d3c08883df1675374f"}, + {file = "cryptography-43.0.3-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:443c4a81bb10daed9a8f334365fe52542771f25aedaf889fd323a853ce7377d6"}, + {file = "cryptography-43.0.3-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:74f57f24754fe349223792466a709f8e0c093205ff0dca557af51072ff47ab18"}, + {file = "cryptography-43.0.3-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:9762ea51a8fc2a88b70cf2995e5675b38d93bf36bd67d91721c309df184f49bd"}, + {file = "cryptography-43.0.3-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:81ef806b1fef6b06dcebad789f988d3b37ccaee225695cf3e07648eee0fc6b73"}, + {file = "cryptography-43.0.3-cp37-abi3-win32.whl", hash = "sha256:cbeb489927bd7af4aa98d4b261af9a5bc025bd87f0e3547e11584be9e9427be2"}, + {file = "cryptography-43.0.3-cp37-abi3-win_amd64.whl", hash = "sha256:f46304d6f0c6ab8e52770addfa2fc41e6629495548862279641972b6215451cd"}, + {file = "cryptography-43.0.3-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:8ac43ae87929a5982f5948ceda07001ee5e83227fd69cf55b109144938d96984"}, + {file = "cryptography-43.0.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:846da004a5804145a5f441b8530b4bf35afbf7da70f82409f151695b127213d5"}, + {file = "cryptography-43.0.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f996e7268af62598f2fc1204afa98a3b5712313a55c4c9d434aef49cadc91d4"}, + {file = "cryptography-43.0.3-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:f7b178f11ed3664fd0e995a47ed2b5ff0a12d893e41dd0494f406d1cf555cab7"}, + {file = "cryptography-43.0.3-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:c2e6fc39c4ab499049df3bdf567f768a723a5e8464816e8f009f121a5a9f4405"}, + {file = "cryptography-43.0.3-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:e1be4655c7ef6e1bbe6b5d0403526601323420bcf414598955968c9ef3eb7d16"}, + {file = "cryptography-43.0.3-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:df6b6c6d742395dd77a23ea3728ab62f98379eff8fb61be2744d4679ab678f73"}, + {file = "cryptography-43.0.3-cp39-abi3-win32.whl", hash = "sha256:d56e96520b1020449bbace2b78b603442e7e378a9b3bd68de65c782db1507995"}, + {file = "cryptography-43.0.3-cp39-abi3-win_amd64.whl", hash = "sha256:0c580952eef9bf68c4747774cde7ec1d85a6e61de97281f2dba83c7d2c806362"}, + {file = "cryptography-43.0.3-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:d03b5621a135bffecad2c73e9f4deb1a0f977b9a8ffe6f8e002bf6c9d07b918c"}, + {file = "cryptography-43.0.3-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:a2a431ee15799d6db9fe80c82b055bae5a752bef645bba795e8e52687c69efe3"}, + {file = "cryptography-43.0.3-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:281c945d0e28c92ca5e5930664c1cefd85efe80e5c0d2bc58dd63383fda29f83"}, + {file = "cryptography-43.0.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:f18c716be16bc1fea8e95def49edf46b82fccaa88587a45f8dc0ff6ab5d8e0a7"}, + {file = "cryptography-43.0.3-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:4a02ded6cd4f0a5562a8887df8b3bd14e822a90f97ac5e544c162899bc467664"}, + {file = "cryptography-43.0.3-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:53a583b6637ab4c4e3591a15bc9db855b8d9dee9a669b550f311480acab6eb08"}, + {file = "cryptography-43.0.3-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:1ec0bcf7e17c0c5669d881b1cd38c4972fade441b27bda1051665faaa89bdcaa"}, + {file = "cryptography-43.0.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2ce6fae5bdad59577b44e4dfed356944fbf1d925269114c28be377692643b4ff"}, + {file = "cryptography-43.0.3.tar.gz", hash = "sha256:315b9001266a492a6ff443b61238f956b214dbec9910a081ba5b6646a055a805"}, +] + +[package.dependencies] +cffi = {version = ">=1.12", markers = "platform_python_implementation != \"PyPy\""} + +[package.extras] +docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=1.1.1)"] +docstest = ["pyenchant (>=1.6.11)", "readme-renderer", "sphinxcontrib-spelling (>=4.0.1)"] +nox = ["nox"] +pep8test = ["check-sdist", "click", "mypy", "ruff"] +sdist = ["build"] +ssh = ["bcrypt (>=3.1.5)"] +test = ["certifi", "cryptography-vectors (==43.0.3)", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] +test-randomorder = ["pytest-randomly"] + [[package]] name = "decorator" version = "5.1.1" @@ -378,6 +506,23 @@ files = [ [package.extras] all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] +[[package]] +name = "jinja2" +version = "3.1.4" +description = "A very fast and expressive template engine." +optional = false +python-versions = ">=3.7" +files = [ + {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, + {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, +] + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + [[package]] name = "jmespath" version = "1.0.1" @@ -403,6 +548,122 @@ files = [ [package.dependencies] six = "*" +[[package]] +name = "markupsafe" +version = "3.0.2" +description = "Safely add untrusted strings to HTML/XML markup." +optional = false +python-versions = ">=3.9" +files = [ + {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:38a9ef736c01fccdd6600705b09dc574584b89bea478200c5fbf112a6b0d5579"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bbcb445fa71794da8f178f0f6d66789a28d7319071af7a496d4d507ed566270d"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57cb5a3cf367aeb1d316576250f65edec5bb3be939e9247ae594b4bcbc317dfb"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3809ede931876f5b2ec92eef964286840ed3540dadf803dd570c3b7e13141a3b"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e07c3764494e3776c602c1e78e298937c3315ccc9043ead7e685b7f2b8d47b3c"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b424c77b206d63d500bcb69fa55ed8d0e6a3774056bdc4839fc9298a7edca171"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-win32.whl", hash = "sha256:fcabf5ff6eea076f859677f5f0b6b5c1a51e70a376b0579e0eadef8db48c6b50"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:6af100e168aa82a50e186c82875a5893c5597a0c1ccdb0d8b40240b1f28b969a"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-win32.whl", hash = "sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-win32.whl", hash = "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-win32.whl", hash = "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-win32.whl", hash = "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:eaa0a10b7f72326f1372a713e73c3f739b524b3af41feb43e4921cb529f5929a"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:48032821bbdf20f5799ff537c7ac3d1fba0ba032cfc06194faffa8cda8b560ff"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a9d3f5f0901fdec14d8d2f66ef7d035f2157240a433441719ac9a3fba440b13"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88b49a3b9ff31e19998750c38e030fc7bb937398b1f78cfa599aaef92d693144"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cfad01eed2c2e0c01fd0ecd2ef42c492f7f93902e39a42fc9ee1692961443a29"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:1225beacc926f536dc82e45f8a4d68502949dc67eea90eab715dea3a21c1b5f0"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:3169b1eefae027567d1ce6ee7cae382c57fe26e82775f460f0b2778beaad66c0"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:eb7972a85c54febfb25b5c4b4f3af4dcc731994c7da0d8a0b4a6eb0640e1d178"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-win32.whl", hash = "sha256:8c4e8c3ce11e1f92f6536ff07154f9d49677ebaaafc32db9db4620bc11ed480f"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:6e296a513ca3d94054c2c881cc913116e90fd030ad1c656b3869762b754f5f8a"}, + {file = "markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0"}, +] + +[[package]] +name = "moto" +version = "5.0.21" +description = "" +optional = false +python-versions = ">=3.8" +files = [ + {file = "moto-5.0.21-py3-none-any.whl", hash = "sha256:1235b2ae3666459c9cc44504a5e73d35f4959b45e5876b2f6df2e5f4889dfb4f"}, + {file = "moto-5.0.21.tar.gz", hash = "sha256:52f63291daeff9444ef5eb14fbf69b24264567b79f184ae6aee4945d09845f06"}, +] + +[package.dependencies] +boto3 = ">=1.9.201" +botocore = ">=1.14.0,<1.35.45 || >1.35.45,<1.35.46 || >1.35.46" +cryptography = ">=3.3.1" +Jinja2 = ">=2.10.1" +python-dateutil = ">=2.1,<3.0.0" +requests = ">=2.5" +responses = ">=0.15.0" +werkzeug = ">=0.5,<2.2.0 || >2.2.0,<2.2.1 || >2.2.1" +xmltodict = "*" + +[package.extras] +all = ["PyYAML (>=5.1)", "antlr4-python3-runtime", "aws-xray-sdk (>=0.93,!=0.96)", "cfn-lint (>=0.40.0)", "docker (>=3.0.0)", "graphql-core", "joserfc (>=0.9.0)", "jsondiff (>=1.1.2)", "jsonpath-ng", "jsonschema", "multipart", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.6)", "pyparsing (>=3.0.7)", "setuptools"] +apigateway = ["PyYAML (>=5.1)", "joserfc (>=0.9.0)", "openapi-spec-validator (>=0.5.0)"] +apigatewayv2 = ["PyYAML (>=5.1)", "openapi-spec-validator (>=0.5.0)"] +appsync = ["graphql-core"] +awslambda = ["docker (>=3.0.0)"] +batch = ["docker (>=3.0.0)"] +cloudformation = ["PyYAML (>=5.1)", "aws-xray-sdk (>=0.93,!=0.96)", "cfn-lint (>=0.40.0)", "docker (>=3.0.0)", "graphql-core", "joserfc (>=0.9.0)", "jsondiff (>=1.1.2)", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.6)", "pyparsing (>=3.0.7)", "setuptools"] +cognitoidp = ["joserfc (>=0.9.0)"] +dynamodb = ["docker (>=3.0.0)", "py-partiql-parser (==0.5.6)"] +dynamodbstreams = ["docker (>=3.0.0)", "py-partiql-parser (==0.5.6)"] +events = ["jsonpath-ng"] +glue = ["pyparsing (>=3.0.7)"] +iotdata = ["jsondiff (>=1.1.2)"] +proxy = ["PyYAML (>=5.1)", "antlr4-python3-runtime", "aws-xray-sdk (>=0.93,!=0.96)", "cfn-lint (>=0.40.0)", "docker (>=2.5.1)", "graphql-core", "joserfc (>=0.9.0)", "jsondiff (>=1.1.2)", "jsonpath-ng", "multipart", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.6)", "pyparsing (>=3.0.7)", "setuptools"] +quicksight = ["jsonschema"] +resourcegroupstaggingapi = ["PyYAML (>=5.1)", "cfn-lint (>=0.40.0)", "docker (>=3.0.0)", "graphql-core", "joserfc (>=0.9.0)", "jsondiff (>=1.1.2)", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.6)", "pyparsing (>=3.0.7)"] +s3 = ["PyYAML (>=5.1)", "py-partiql-parser (==0.5.6)"] +s3crc32c = ["PyYAML (>=5.1)", "crc32c", "py-partiql-parser (==0.5.6)"] +server = ["PyYAML (>=5.1)", "antlr4-python3-runtime", "aws-xray-sdk (>=0.93,!=0.96)", "cfn-lint (>=0.40.0)", "docker (>=3.0.0)", "flask (!=2.2.0,!=2.2.1)", "flask-cors", "graphql-core", "joserfc (>=0.9.0)", "jsondiff (>=1.1.2)", "jsonpath-ng", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.6)", "pyparsing (>=3.0.7)", "setuptools"] +ssm = ["PyYAML (>=5.1)"] +stepfunctions = ["antlr4-python3-runtime", "jsonpath-ng"] +xray = ["aws-xray-sdk (>=0.93,!=0.96)", "setuptools"] + [[package]] name = "mypy" version = "1.11.2" @@ -555,6 +816,17 @@ files = [ {file = "pyasn1-0.6.1.tar.gz", hash = "sha256:6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034"}, ] +[[package]] +name = "pycparser" +version = "2.22" +description = "C parser in Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, + {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, +] + [[package]] name = "pydantic" version = "2.9.2" @@ -733,6 +1005,68 @@ files = [ {file = "python_ulid-1.1.0-py3-none-any.whl", hash = "sha256:88c952f6be133dbede19c907d72d26717d2691ec8421512b573144794d891e24"}, ] +[[package]] +name = "pyyaml" +version = "6.0.2" +description = "YAML parser and emitter for Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, + {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed"}, + {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180"}, + {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68"}, + {file = "PyYAML-6.0.2-cp310-cp310-win32.whl", hash = "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99"}, + {file = "PyYAML-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e"}, + {file = "PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774"}, + {file = "PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85"}, + {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4"}, + {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e"}, + {file = "PyYAML-6.0.2-cp311-cp311-win32.whl", hash = "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5"}, + {file = "PyYAML-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44"}, + {file = "PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab"}, + {file = "PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476"}, + {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48"}, + {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b"}, + {file = "PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4"}, + {file = "PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8"}, + {file = "PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba"}, + {file = "PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5"}, + {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc"}, + {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652"}, + {file = "PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183"}, + {file = "PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563"}, + {file = "PyYAML-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083"}, + {file = "PyYAML-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706"}, + {file = "PyYAML-6.0.2-cp38-cp38-win32.whl", hash = "sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a"}, + {file = "PyYAML-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff"}, + {file = "PyYAML-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d"}, + {file = "PyYAML-6.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19"}, + {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e"}, + {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725"}, + {file = "PyYAML-6.0.2-cp39-cp39-win32.whl", hash = "sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631"}, + {file = "PyYAML-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8"}, + {file = "pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"}, +] + [[package]] name = "requests" version = "2.32.3" @@ -754,6 +1088,25 @@ urllib3 = ">=1.21.1,<3" socks = ["PySocks (>=1.5.6,!=1.5.7)"] use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] +[[package]] +name = "responses" +version = "0.25.3" +description = "A utility library for mocking out the `requests` Python library." +optional = false +python-versions = ">=3.8" +files = [ + {file = "responses-0.25.3-py3-none-any.whl", hash = "sha256:521efcbc82081ab8daa588e08f7e8a64ce79b91c39f6e62199b19159bea7dbcb"}, + {file = "responses-0.25.3.tar.gz", hash = "sha256:617b9247abd9ae28313d57a75880422d55ec63c29d33d629697590a034358dba"}, +] + +[package.dependencies] +pyyaml = "*" +requests = ">=2.30.0,<3.0" +urllib3 = ">=1.25.10,<3.0" + +[package.extras] +tests = ["coverage (>=6.0.0)", "flake8", "mypy", "pytest (>=7.0.0)", "pytest-asyncio", "pytest-cov", "pytest-httpserver", "tomli", "tomli-w", "types-PyYAML", "types-requests"] + [[package]] name = "retry" version = "0.9.2" @@ -939,7 +1292,35 @@ h11 = ">=0.8" [package.extras] standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"] +[[package]] +name = "werkzeug" +version = "3.1.3" +description = "The comprehensive WSGI web application library." +optional = false +python-versions = ">=3.9" +files = [ + {file = "werkzeug-3.1.3-py3-none-any.whl", hash = "sha256:54b78bf3716d19a65be4fceccc0d1d7b89e608834989dfae50ea87564639213e"}, + {file = "werkzeug-3.1.3.tar.gz", hash = "sha256:60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746"}, +] + +[package.dependencies] +MarkupSafe = ">=2.1.1" + +[package.extras] +watchdog = ["watchdog (>=2.3)"] + +[[package]] +name = "xmltodict" +version = "0.14.2" +description = "Makes working with XML feel like you are working with JSON" +optional = false +python-versions = ">=3.6" +files = [ + {file = "xmltodict-0.14.2-py2.py3-none-any.whl", hash = "sha256:20cc7d723ed729276e808f26fb6b3599f786cbc37e06c65e192ba77c40f20aac"}, + {file = "xmltodict-0.14.2.tar.gz", hash = "sha256:201e7c28bb210e374999d1dde6382923ab0ed1a8a5faeece48ab525b7810a553"}, +] + [metadata] lock-version = "2.0" python-versions = ">=3.11,<3.13" -content-hash = "c3a4705bee027f05c7df8b2b4030f2e18d259b583f3400a591466d182fe25e70" +content-hash = "7784d4fc73f13cb7a77814808ca2dc2120cc41613239827e16816d1805e9280b" diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 5f5e3b584..8f978c7a1 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -19,6 +19,7 @@ langdetect = "^1.0.9" retry = ">=0.9.2,<1" types-retry = ">=0.9.9.4,<1" duckduckgo-search = "^6.1.4" +moto = "^5.0.21" [tool.poetry.group.dev.dependencies] mypy = "^1.10.0" diff --git a/backend/tests/test_repositories/test_conversation.py b/backend/tests/test_repositories/test_conversation.py index 5f474085e..b7d69d41e 100644 --- a/backend/tests/test_repositories/test_conversation.py +++ b/backend/tests/test_repositories/test_conversation.py @@ -1,5 +1,8 @@ +import json +import os import sys import unittest +from unittest.mock import MagicMock, patch sys.path.append(".") @@ -36,91 +39,38 @@ ConversationQuickStarterModel, GenerationParamsModel, KnowledgeModel, + ModelActivateModel, ) -from boto3.dynamodb.conditions import Key -from botocore.exceptions import ClientError - -# class TestRowLevelAccess(unittest.TestCase): -# def setUp(self) -> None: -# self.conversation_user_1 = ConversationModel( -# id="1", -# create_time=1627984879.9, -# title="Test Conversation", -# message_map={ -# "a": MessageModel( -# role="user", -# content=ContentModel(content_type="text", body="Hello"), -# model="model", -# children=["x", "y"], -# parent="z", -# create_time=1627984879.9, -# ) -# }, -# last_message_id="x", -# ) -# store_conversation("user1", self.conversation_user_1) - -# self.conversation_user_2 = ConversationModel( -# id="2", -# create_time=1627984879.9, -# title="Test Conversation", -# message_map={ -# "a": MessageModel( -# role="user", -# content=ContentModel(content_type="text", body="Hello"), -# model="model", -# children=["x", "y"], -# parent="z", -# create_time=1627984879.9, -# ) -# }, -# last_message_id="x", -# ) -# store_conversation("user2", self.conversation_user_2) - -# def test_find_conversation_by_user_id(self): -# # Create table client for user1 -# table = _get_table_client("user1") - -# table.query( -# KeyConditionExpression=Key("PK").eq( -# compose_conv_id("user1", self.conversation_user_1.id) -# ) -# ) - -# with self.assertRaises(ClientError): -# # Raise `AccessDeniedException` because user1 cannot access user2's data -# table.query( -# KeyConditionExpression=Key("PK").eq( -# compose_conv_id("user2", self.conversation_user_2.id) -# ) -# ) - -# def test_find_conversation_by_id(self): -# # Create table client for user1 -# table = _get_table_client("user1") - -# table.query( -# IndexName="SKIndex", -# KeyConditionExpression=Key("SK").eq( -# compose_conv_id("user1", self.conversation_user_1.id) -# ), -# ) -# with self.assertRaises(ClientError): -# # Raise `AccessDeniedException` because user1 cannot access user2's data -# table.query( -# IndexName="SKIndex", -# KeyConditionExpression=Key("SK").eq( -# compose_conv_id("user2", self.conversation_user_2.id) -# ), -# ) - -# def tearDown(self) -> None: -# delete_conversation_by_user_id("user1") -# delete_conversation_by_user_id("user2") class TestConversationRepository(unittest.TestCase): + def setUp(self): + self.patcher1 = patch('boto3.resource') + self.patcher2 = patch('app.repositories.conversation.s3_client') + self.mock_boto3_resource = self.patcher1.start() + self.mock_s3_client = self.patcher2.start() + + self.mock_table = MagicMock() + self.mock_boto3_resource.return_value.Table.return_value = self.mock_table + + # Set up environment variables + os.environ["CONVERSATION_TABLE_NAME"] = "test-table" + os.environ["CONVERSATION_BUCKET_NAME"] = "test-bucket" + os.environ["LARGE_MESSAGE_BUCKET"] = "test-large-message-bucket" + os.environ["BEDROCK_REGION"] = "us-east-1" + + self.title_updated = False + self.feedback_updated = False + self.conversation_deleted = False + + def tearDown(self): + self.patcher1.stop() + self.patcher2.stop() + os.environ.pop("CONVERSATION_TABLE_NAME", None) + os.environ.pop("CONVERSATION_BUCKET_NAME", None) + os.environ.pop("LARGE_MESSAGE_BUCKET", None) + os.environ.pop("BEDROCK_REGION", None) + def test_store_and_find_conversation(self): conversation = ConversationModel( id="1", @@ -183,6 +133,50 @@ def test_store_and_find_conversation(self): should_continue=False, ) + # Mock the responses + self.mock_table.put_item.return_value = {"ResponseMetadata": {"HTTPStatusCode": 200}} + + def mock_query_side_effect(**kwargs): + if self.conversation_deleted: + return {"Items": []} + + if "IndexName" in kwargs and kwargs["IndexName"] == "SKIndex": + message_map = conversation.model_dump()["message_map"] + if self.feedback_updated: + message_map["a"]["feedback"] = { + "thumbs_up": True, + "category": "Good", + "comment": "The response is pretty good." + } + return { + "Items": [{ + "PK": "user", + "SK": "user#CONV#1", + "Title": "Updated title" if self.title_updated else "Test Conversation", + "CreateTime": 1627984879.9, + "TotalPrice": 100, + "LastMessageId": "x", + "MessageMap": json.dumps(message_map), + "IsLargeMessage": False, + "ShouldContinue": False + }] + } + return { + "Items": [] if self.conversation_deleted else [{ + "PK": "user", + "SK": "user#CONV#1", + "Title": "Test Conversation", + "CreateTime": 1627984879.9, + "TotalPrice": 100, + "LastMessageId": "x", + "MessageMap": json.dumps(conversation.model_dump()["message_map"]), + "IsLargeMessage": False, + "ShouldContinue": False + }] + } + + self.mock_table.query.side_effect = mock_query_side_effect + # Test storing conversation response = store_conversation("user", conversation) self.assertIsNotNone(response) @@ -196,6 +190,8 @@ def test_store_and_find_conversation(self): user_id="user", conversation_id="1" ) self.assertEqual(found_conversation.id, "1") + self.assertEqual(found_conversation.title, "Test Conversation") + message_map = found_conversation.message_map # Assert whether the message map is correctly reconstructed self.assertEqual(message_map["a"].role, "user") @@ -208,7 +204,7 @@ def test_store_and_find_conversation(self): content[1].body, "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=", ) - self.assertEqual(content[1].media_type, "image/png") + self.assertEqual(found_conversation.message_map["a"].role, "user") self.assertEqual(message_map["a"].model, "claude-instant-v1") self.assertEqual(message_map["a"].children, ["x", "y"]) self.assertEqual(message_map["a"].parent, "z") @@ -228,11 +224,17 @@ def test_store_and_find_conversation(self): self.assertEqual( message_map["a"].thinking_log[0].content[0].body.name, "internet_search" # type: ignore ) + self.assertEqual(found_conversation.message_map["a"].content[0].body, "Hello") self.assertEqual( message_map["a"].thinking_log[0].content[0].body.input["query"], "Google news" # type: ignore ) # Test update title + self.title_updated = True + self.mock_table.update_item.return_value = { + "Attributes": {"Title": "Updated title"}, + "ResponseMetadata": {"HTTPStatusCode": 200}, + } response = change_conversation_title( user_id="user", conversation_id="1", @@ -245,6 +247,7 @@ def test_store_and_find_conversation(self): # Test give a feedback self.assertIsNone(found_conversation.message_map["a"].feedback) + self.feedback_updated = True response = update_feedback( user_id="user", conversation_id="1", @@ -263,6 +266,7 @@ def test_store_and_find_conversation(self): self.assertEqual(feedback.comment, "The response is pretty good.") # type: ignore # Test deleting conversation by id + self.conversation_deleted = True delete_conversation_by_id(user_id="user", conversation_id="1") with self.assertRaises(RecordNotFoundError): find_conversation_by_id("user", "1") @@ -281,8 +285,7 @@ def test_store_and_find_large_conversation(self): content=[ ContentModel( content_type="text", - body="This is a large message." - * 1000, # Repeating to make it large + body="This is a large message." * 1000, media_type=None, file_name=None, ) @@ -295,7 +298,7 @@ def test_store_and_find_large_conversation(self): used_chunks=None, thinking_log=None, ) - for i in range(10) # Create 10 large messages + for i in range(10) } large_conversation = ConversationModel( @@ -309,7 +312,64 @@ def test_store_and_find_large_conversation(self): should_continue=False, ) - # Test storing large conversation with a small threshold + # Mock responses + self.mock_table.put_item.return_value = {"ResponseMetadata": {"HTTPStatusCode": 200}} + self.mock_s3_client.put_object.return_value = {"ResponseMetadata": {"HTTPStatusCode": 200}} + + def mock_query_side_effect(**kwargs): + if self.conversation_deleted: + return {"Items": []} + + if "IndexName" in kwargs and kwargs["IndexName"] == "SKIndex": + return { + "Items": [{ + "PK": "user", + "SK": "user#CONV#2", + "Title": "Large Conversation", + "CreateTime": 1627984879.9, + "TotalPrice": 200, + "LastMessageId": "msg_9", + "IsLargeMessage": True, + "LargeMessagePath": "user/2/message_map.json", + "MessageMap": json.dumps({"system": { + "role": "system", + "content": [{"content_type": "text", "body": "Hello", "media_type": None}], + "model": "claude-instant-v1", + "children": [], + "parent": None, + "create_time": 1627984879.9, + "feedback": None, + "used_chunks": None, + "thinking_log": None + }}), + "ShouldContinue": False + }] + } + return {"Items": []} + + self.mock_table.query.side_effect = mock_query_side_effect + + message_map_json = json.dumps({ + k: { + "role": v.role, + "content": [c.model_dump() for c in v.content], + "model": v.model, + "children": v.children, + "parent": v.parent, + "create_time": v.create_time, + "feedback": v.feedback, + "used_chunks": v.used_chunks, + "thinking_log": v.thinking_log + } + for k, v in large_message_map.items() + }) + self.mock_s3_client.get_object.return_value = { + "Body": MagicMock( + read=lambda: message_map_json.encode() + ) + } + + # Test storing large conversation response = store_conversation("user", large_conversation, threshold=1) self.assertIsNotNone(response) @@ -323,14 +383,12 @@ def test_store_and_find_large_conversation(self): self.assertEqual(found_conversation.last_message_id, "msg_9") self.assertEqual(found_conversation.bot_id, None) self.assertEqual(found_conversation.should_continue, False) - - message_map = found_conversation.message_map - self.assertEqual(len(message_map), 10) + self.assertEqual(len(found_conversation.message_map), 10) for i in range(10): message_id = f"msg_{i}" - self.assertIn(message_id, message_map) - message = message_map[message_id] + self.assertIn(message_id, found_conversation.message_map) + message = found_conversation.message_map[message_id] self.assertEqual(message.role, "user") self.assertEqual(len(message.content), 1) self.assertEqual(message.content[0].content_type, "text") @@ -342,6 +400,7 @@ def test_store_and_find_large_conversation(self): self.assertEqual(message.create_time, 1627984879.9) # Test deleting large conversation + self.conversation_deleted = True delete_conversation_by_id(user_id="user", conversation_id="2") with self.assertRaises(RecordNotFoundError): find_conversation_by_id("user", "2") @@ -351,10 +410,28 @@ def test_store_and_find_large_conversation(self): conversations = find_conversation_by_user_id(user_id="user") self.assertEqual(len(conversations), 0) - class TestConversationBotRepository(unittest.TestCase): - def setUp(self) -> None: - conversation1 = ConversationModel( + def setUp(self): + self.patcher = patch('boto3.resource') + self.mock_boto3_resource = self.patcher.start() + + self.mock_table = MagicMock() + self.mock_boto3_resource.return_value.Table.return_value = self.mock_table + + # Set up environment variables + os.environ["CONVERSATION_TABLE_NAME"] = "test-table" + os.environ["CONVERSATION_BUCKET_NAME"] = "test-bucket" + + self.model_activate = ModelActivateModel( + claude3_sonnet_v1=True, + claude3_haiku_v1=True, + claude3_opus_v1=True, + claude3_5_sonnet_v1=True, + claude3_5_sonnet_v2=True, + claude3_5_haiku_v1=True, + ) + + self.conversation1 = ConversationModel( id="1", create_time=1627984879.9, title="Test Conversation", @@ -362,20 +439,7 @@ def setUp(self) -> None: message_map={ "a": MessageModel( role="user", - content=[ - ContentModel( - content_type="text", - body="Hello", - media_type=None, - file_name=None, - ), - ContentModel( - content_type="image", - body="iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=", - media_type="image/png", - file_name=None, - ), - ], + content=[ContentModel(content_type="text", body="Hello", media_type=None, file_name=None)], model="claude-instant-v1", children=["x", "y"], parent="z", @@ -389,7 +453,8 @@ def setUp(self) -> None: bot_id=None, should_continue=False, ) - conversation2 = ConversationModel( + + self.conversation2 = ConversationModel( id="2", create_time=1627984879.9, title="Test Conversation", @@ -424,7 +489,8 @@ def setUp(self) -> None: bot_id="1", should_continue=False, ) - bot1 = BotModel( + + self.bot1 = BotModel( id="1", title="Test Bot", instruction="Test Bot Prompt", @@ -465,8 +531,10 @@ def setUp(self) -> None: ], bedrock_knowledge_base=None, bedrock_guardrails=None, + model_activate=self.model_activate, ) - bot2 = BotModel( + + self.bot2 = BotModel( id="2", title="Test Bot", instruction="Test Bot Prompt", @@ -507,26 +575,65 @@ def setUp(self) -> None: ], bedrock_knowledge_base=None, bedrock_guardrails=None, + model_activate=self.model_activate, # Added the missing field ) - store_conversation("user", conversation1) - store_bot("user", bot1) - store_bot("user", bot2) - store_conversation("user", conversation2) + store_conversation("user", self.conversation1) + store_bot("user", self.bot1) + store_bot("user", self.bot2) + store_conversation("user", self.conversation2) + + def tearDown(self): + self.patcher.stop() + os.environ.pop("CONVERSATION_TABLE_NAME", None) + os.environ.pop("CONVERSATION_BUCKET_NAME", None) def test_only_conversation_is_fetched(self): + self.mock_table.query.return_value = { + "Items": [{ + "PK": "user", + "SK": "user#CONV#1", + "Title": "Test Conversation", + "CreateTime": 1627984879.9, + "MessageMap": json.dumps({ + "system": { + "role": "system", + "content": [{"content_type": "text", "body": "Hello", "media_type": None}], + "model": "claude-instant-v1", + "children": [], + "parent": None, + "create_time": 1627984879.9, + "feedback": None, + "used_chunks": None, + "thinking_log": None + } + }), + "BotId": None + }] + } conversations = find_conversation_by_user_id("user") - self.assertEqual(len(conversations), 2) + self.assertEqual(len(conversations), 1) def test_only_bot_is_fetched(self): + self.mock_table.query.return_value = { + "Items": [{ + "PK": "user", + "SK": "user#BOT#1", + "Title": "Test Bot", + "Description": "Test Bot Description", + "CreateTime": 1627984879.9, + "LastBotUsed": 1627984879.9, + "IsPinned": False, + "SyncStatus": "RUNNING", + "BedrockKnowledgeBase": None + }] + } bots = find_private_bots_by_user_id("user") - self.assertEqual(len(bots), 2) - - def tearDown(self) -> None: + self.assertEqual(len(bots), 1) +def tearDown(self) -> None: delete_conversation_by_user_id("user") delete_bot_by_id("user", "1") delete_bot_by_id("user", "2") - if __name__ == "__main__": unittest.main() From 7192d87f6cf34a1f6a68b512cf3db92e2d6ff11e Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Mon, 25 Nov 2024 02:22:41 +0000 Subject: [PATCH 06/34] =?UTF-8?q?mistral=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/repositories/models/custom_bot.py | 19 ++-- backend/app/routes/schemas/bot.py | 36 +++++--- frontend/src/@types/bot.d.ts | 18 ++-- .../knowledgeBase/pages/BotKbEditPage.tsx | 87 ++++++++++++------- frontend/src/hooks/useModel.ts | 4 +- frontend/src/pages/ChatPage.tsx | 24 +++-- 6 files changed, 126 insertions(+), 62 deletions(-) diff --git a/backend/app/repositories/models/custom_bot.py b/backend/app/repositories/models/custom_bot.py index 49455097c..d2a69bb4e 100644 --- a/backend/app/repositories/models/custom_bot.py +++ b/backend/app/repositories/models/custom_bot.py @@ -1,3 +1,4 @@ +from typing import Optional from app.repositories.models.common import Float from app.repositories.models.custom_bot_guardrails import BedrockGuardrailsModel from app.repositories.models.custom_bot_kb import BedrockKnowledgeBaseModel @@ -55,12 +56,18 @@ class ConversationQuickStarterModel(BaseModel): class ModelActivateModel(BaseModel): - claude3_sonnet_v1: bool - claude3_haiku_v1: bool - claude3_opus_v1: bool - claude3_5_sonnet_v1: bool - claude3_5_sonnet_v2: bool - claude3_5_haiku_v1: bool + # Claude models + claude3_sonnet_v1: Optional[bool] = None + claude3_haiku_v1: Optional[bool] = None + claude3_opus_v1: Optional[bool] = None + claude3_5_sonnet_v1: Optional[bool] = None + claude3_5_sonnet_v2: Optional[bool] = None + claude3_5_haiku_v1: Optional[bool] = None + + # Mistral models + mistral7b: Optional[bool] = None + mistral8x7b: Optional[bool] = None + mistralLarge: Optional[bool] = None class BotModel(BaseModel): diff --git a/backend/app/routes/schemas/bot.py b/backend/app/routes/schemas/bot.py index 9f21f2e35..dab4aae16 100644 --- a/backend/app/routes/schemas/bot.py +++ b/backend/app/routes/schemas/bot.py @@ -29,21 +29,33 @@ class ModelActivateInput(BaseSchema): - claude3_sonnet_v1: bool = True - claude3_haiku_v1: bool = True - claude3_opus_v1: bool = True - claude3_5_sonnet_v1: bool = True - claude3_5_sonnet_v2: bool = True - claude3_5_haiku_v1: bool = True + # Claude models + claude3_sonnet_v1: bool | None + claude3_haiku_v1: bool | None + claude3_opus_v1: bool | None + claude3_5_sonnet_v1: bool | None + claude3_5_sonnet_v2: bool | None + claude3_5_haiku_v1: bool | None + + # Mistral models + mistral7b: bool | None + mistral8x7b: bool | None + mistralLarge: bool | None class ModelActivateOutput(BaseSchema): - claude3_sonnet_v1: bool = True - claude3_haiku_v1: bool = True - claude3_opus_v1: bool = True - claude3_5_sonnet_v1: bool = True - claude3_5_sonnet_v2: bool = True - claude3_5_haiku_v1: bool = True + # Claude models + claude3_sonnet_v1: bool | None + claude3_haiku_v1: bool | None + claude3_opus_v1: bool | None + claude3_5_sonnet_v1: bool | None + claude3_5_sonnet_v2: bool | None + claude3_5_haiku_v1: bool | None + + # Mistral models + mistral7b: bool | None + mistral8x7b: bool | None + mistralLarge: bool | None class GenerationParams(BaseSchema): diff --git a/frontend/src/@types/bot.d.ts b/frontend/src/@types/bot.d.ts index 632e449af..3959e823f 100644 --- a/frontend/src/@types/bot.d.ts +++ b/frontend/src/@types/bot.d.ts @@ -3,12 +3,18 @@ import { BedrockKnowledgeBase } from '../features/knowledgeBase/types'; export type BotKind = 'private' | 'mixed'; export type ModelActivate = { - claude3SonnetV1: boolean; - claude3HaikuV1: boolean; - claude3OpusV1: boolean; - claude35SonnetV1: boolean; - claude35SonnetV2: boolean; - claude35HaikuV1: boolean; + // # Claude models + claude3SonnetV1?: boolean; + claude3HaikuV1?: boolean; + claude3OpusV1?: boolean; + claude35SonnetV1?: boolean; + claude35SonnetV2?: boolean; + claude35HaikuV1?: boolean; + + // Mistral models + mistral7b?: boolean + mistral8x7b?: boolean + mistralLarge?: boolean }; export type BotMeta = { diff --git a/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx b/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx index c147f4262..7bda7c988 100644 --- a/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx +++ b/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx @@ -59,13 +59,17 @@ import { WebCrawlingScope, } from '../types'; + +const MISTRAL_ENABLED: boolean = + import.meta.env.VITE_APP_ENABLE_MISTRAL === 'true'; + const edgeGenerationParams = - import.meta.env.VITE_APP_ENABLE_MISTRAL === 'true' +MISTRAL_ENABLED === true ? EDGE_MISTRAL_GENERATION_PARAMS : EDGE_GENERATION_PARAMS; const defaultGenerationConfig = - import.meta.env.VITE_APP_ENABLE_MISTRAL === 'true' +MISTRAL_ENABLED === true ? DEFAULT_MISTRAL_GENERATION_CONFIG : DEFAULT_GENERATION_CONFIG; @@ -133,43 +137,68 @@ const BotKbEditPage: React.FC = () => { }); const [modelActivate, setModelActivate] = useState({ + // Claude models claude3SonnetV1: true, claude3HaikuV1: true, claude3OpusV1: true, claude35SonnetV1: true, claude35SonnetV2: true, claude35HaikuV1: true, + + // Mistral models + mistral7b: true, + mistral8x7b: true, + mistralLarge: true, }); const modelActivateOptions: { key: string, label: string - }[] = [ - { - key: 'claude3SonnetV1', - label: t('model.sonnet3.label') - }, - { - key: 'claude3HaikuV1', - label: t("model.haiku3.label") - }, - { - key: 'claude3OpusV1', - label: t("model.opus3.label") - }, - { - key: 'claude35SonnetV1', - label: t('model.sonnet3-5.label') - }, - { - key: 'claude35SonnetV2', - label: t('model.sonnet3-5-v2.label') - }, - { - key: 'claude35HaikuV1', - label: t('model.haiku3-5.label') - } - ] + }[] = (() => { + return MISTRAL_ENABLED + ? + [ + { + key: 'mistral7b', + label: t('model.mistral7b.label') + }, + { + key: 'mistral8x7b', + label: t('model.mistral8x7b.label') + }, + { + key: 'mistralLarge', + label: t('model.mistralLarge.label') + } + ] + : + [ + { + key: 'claude3SonnetV1', + label: t('model.sonnet3.label') + }, + { + key: 'claude3HaikuV1', + label: t("model.haiku3.label") + }, + { + key: 'claude3OpusV1', + label: t("model.opus3.label") + }, + { + key: 'claude35SonnetV1', + label: t('model.sonnet3-5.label') + }, + { + key: 'claude35SonnetV2', + label: t('model.sonnet3-5-v2.label') + }, + { + key: 'claude35HaikuV1', + label: t('model.haiku3-5.label') + } + ] + })(); const embeddingsModelOptions: { label: string; @@ -2280,7 +2309,7 @@ const BotKbEditPage: React.FC = () => { {modelActivateOptions.map(({ key, label }) => (
onChangeModelActivate(key, value)} /> {label} diff --git a/frontend/src/hooks/useModel.ts b/frontend/src/hooks/useModel.ts index 4e6d5861d..009b55cb0 100644 --- a/frontend/src/hooks/useModel.ts +++ b/frontend/src/hooks/useModel.ts @@ -135,7 +135,9 @@ const useModel = (botId?: string | null, modelActivate?: ModelActivate) => { // Update filtered models when modelActivate changes useEffect(() => { - if (modelActivate !== undefined) { + if (MISTRAL_ENABLED) { + setFilteredModels(availableModels) + } else if (modelActivate !== undefined) { const filtered = availableModels.filter(model => { const key = model.modelActivateKey as keyof ModelActivate; if (modelActivate) { diff --git a/frontend/src/pages/ChatPage.tsx b/frontend/src/pages/ChatPage.tsx index 945588c18..987cbbbf8 100644 --- a/frontend/src/pages/ChatPage.tsx +++ b/frontend/src/pages/ChatPage.tsx @@ -53,14 +53,22 @@ const MISTRAL_ENABLED: boolean = import.meta.env.VITE_APP_ENABLE_MISTRAL === 'true'; // Default model activation settings when no bot is selected -const defaultModelActivate: ModelActivate = { - claude3SonnetV1: true, - claude3HaikuV1: true, - claude35SonnetV1: true, - claude35SonnetV2: true, - claude35HaikuV1: true, - claude3OpusV1: true, -}; +const defaultModelActivate: ModelActivate = (() => { + return MISTRAL_ENABLED + ? { + mistral7b: true, + mistral8x7b: true, + mistralLarge: true, + } + : { + claude3SonnetV1: true, + claude3HaikuV1: true, + claude35SonnetV1: true, + claude35SonnetV2: true, + claude35HaikuV1: true, + claude3OpusV1: true, + }; +})(); const ChatPage: React.FC = () => { const { t } = useTranslation(); From 8b1ea4aa56f4e567031fb8f21997739c33d95bbd Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Mon, 25 Nov 2024 02:33:41 +0000 Subject: [PATCH 07/34] lint --- .../test_repositories/test_conversation.py | 273 +++++++++++------- frontend/src/hooks/useModel.ts | 3 +- frontend/src/pages/ChatPage.tsx | 2 +- 3 files changed, 166 insertions(+), 112 deletions(-) diff --git a/backend/tests/test_repositories/test_conversation.py b/backend/tests/test_repositories/test_conversation.py index b7d69d41e..da4114163 100644 --- a/backend/tests/test_repositories/test_conversation.py +++ b/backend/tests/test_repositories/test_conversation.py @@ -45,14 +45,14 @@ class TestConversationRepository(unittest.TestCase): def setUp(self): - self.patcher1 = patch('boto3.resource') - self.patcher2 = patch('app.repositories.conversation.s3_client') + self.patcher1 = patch("boto3.resource") + self.patcher2 = patch("app.repositories.conversation.s3_client") self.mock_boto3_resource = self.patcher1.start() self.mock_s3_client = self.patcher2.start() - + self.mock_table = MagicMock() self.mock_boto3_resource.return_value.Table.return_value = self.mock_table - + # Set up environment variables os.environ["CONVERSATION_TABLE_NAME"] = "test-table" os.environ["CONVERSATION_BUCKET_NAME"] = "test-bucket" @@ -134,45 +134,61 @@ def test_store_and_find_conversation(self): ) # Mock the responses - self.mock_table.put_item.return_value = {"ResponseMetadata": {"HTTPStatusCode": 200}} - + self.mock_table.put_item.return_value = { + "ResponseMetadata": {"HTTPStatusCode": 200} + } + def mock_query_side_effect(**kwargs): if self.conversation_deleted: return {"Items": []} - + if "IndexName" in kwargs and kwargs["IndexName"] == "SKIndex": message_map = conversation.model_dump()["message_map"] if self.feedback_updated: message_map["a"]["feedback"] = { "thumbs_up": True, "category": "Good", - "comment": "The response is pretty good." + "comment": "The response is pretty good.", } return { - "Items": [{ - "PK": "user", - "SK": "user#CONV#1", - "Title": "Updated title" if self.title_updated else "Test Conversation", - "CreateTime": 1627984879.9, - "TotalPrice": 100, - "LastMessageId": "x", - "MessageMap": json.dumps(message_map), - "IsLargeMessage": False, - "ShouldContinue": False - }] + "Items": [ + { + "PK": "user", + "SK": "user#CONV#1", + "Title": ( + "Updated title" + if self.title_updated + else "Test Conversation" + ), + "CreateTime": 1627984879.9, + "TotalPrice": 100, + "LastMessageId": "x", + "MessageMap": json.dumps(message_map), + "IsLargeMessage": False, + "ShouldContinue": False, + } + ] } return { - "Items": [] if self.conversation_deleted else [{ - "PK": "user", - "SK": "user#CONV#1", - "Title": "Test Conversation", - "CreateTime": 1627984879.9, - "TotalPrice": 100, - "LastMessageId": "x", - "MessageMap": json.dumps(conversation.model_dump()["message_map"]), - "IsLargeMessage": False, - "ShouldContinue": False - }] + "Items": ( + [] + if self.conversation_deleted + else [ + { + "PK": "user", + "SK": "user#CONV#1", + "Title": "Test Conversation", + "CreateTime": 1627984879.9, + "TotalPrice": 100, + "LastMessageId": "x", + "MessageMap": json.dumps( + conversation.model_dump()["message_map"] + ), + "IsLargeMessage": False, + "ShouldContinue": False, + } + ] + ) } self.mock_table.query.side_effect = mock_query_side_effect @@ -313,60 +329,76 @@ def test_store_and_find_large_conversation(self): ) # Mock responses - self.mock_table.put_item.return_value = {"ResponseMetadata": {"HTTPStatusCode": 200}} - self.mock_s3_client.put_object.return_value = {"ResponseMetadata": {"HTTPStatusCode": 200}} - + self.mock_table.put_item.return_value = { + "ResponseMetadata": {"HTTPStatusCode": 200} + } + self.mock_s3_client.put_object.return_value = { + "ResponseMetadata": {"HTTPStatusCode": 200} + } + def mock_query_side_effect(**kwargs): if self.conversation_deleted: return {"Items": []} - + if "IndexName" in kwargs and kwargs["IndexName"] == "SKIndex": return { - "Items": [{ - "PK": "user", - "SK": "user#CONV#2", - "Title": "Large Conversation", - "CreateTime": 1627984879.9, - "TotalPrice": 200, - "LastMessageId": "msg_9", - "IsLargeMessage": True, - "LargeMessagePath": "user/2/message_map.json", - "MessageMap": json.dumps({"system": { - "role": "system", - "content": [{"content_type": "text", "body": "Hello", "media_type": None}], - "model": "claude-instant-v1", - "children": [], - "parent": None, - "create_time": 1627984879.9, - "feedback": None, - "used_chunks": None, - "thinking_log": None - }}), - "ShouldContinue": False - }] + "Items": [ + { + "PK": "user", + "SK": "user#CONV#2", + "Title": "Large Conversation", + "CreateTime": 1627984879.9, + "TotalPrice": 200, + "LastMessageId": "msg_9", + "IsLargeMessage": True, + "LargeMessagePath": "user/2/message_map.json", + "MessageMap": json.dumps( + { + "system": { + "role": "system", + "content": [ + { + "content_type": "text", + "body": "Hello", + "media_type": None, + } + ], + "model": "claude-instant-v1", + "children": [], + "parent": None, + "create_time": 1627984879.9, + "feedback": None, + "used_chunks": None, + "thinking_log": None, + } + } + ), + "ShouldContinue": False, + } + ] } return {"Items": []} self.mock_table.query.side_effect = mock_query_side_effect - message_map_json = json.dumps({ - k: { - "role": v.role, - "content": [c.model_dump() for c in v.content], - "model": v.model, - "children": v.children, - "parent": v.parent, - "create_time": v.create_time, - "feedback": v.feedback, - "used_chunks": v.used_chunks, - "thinking_log": v.thinking_log + message_map_json = json.dumps( + { + k: { + "role": v.role, + "content": [c.model_dump() for c in v.content], + "model": v.model, + "children": v.children, + "parent": v.parent, + "create_time": v.create_time, + "feedback": v.feedback, + "used_chunks": v.used_chunks, + "thinking_log": v.thinking_log, + } + for k, v in large_message_map.items() } - for k, v in large_message_map.items() - }) + ) self.mock_s3_client.get_object.return_value = { - "Body": MagicMock( - read=lambda: message_map_json.encode() - ) + "Body": MagicMock(read=lambda: message_map_json.encode()) } # Test storing large conversation @@ -410,11 +442,12 @@ def mock_query_side_effect(**kwargs): conversations = find_conversation_by_user_id(user_id="user") self.assertEqual(len(conversations), 0) + class TestConversationBotRepository(unittest.TestCase): def setUp(self): - self.patcher = patch('boto3.resource') + self.patcher = patch("boto3.resource") self.mock_boto3_resource = self.patcher.start() - + self.mock_table = MagicMock() self.mock_boto3_resource.return_value.Table.return_value = self.mock_table @@ -439,7 +472,14 @@ def setUp(self): message_map={ "a": MessageModel( role="user", - content=[ContentModel(content_type="text", body="Hello", media_type=None, file_name=None)], + content=[ + ContentModel( + content_type="text", + body="Hello", + media_type=None, + file_name=None, + ) + ], model="claude-instant-v1", children=["x", "y"], parent="z", @@ -590,50 +630,65 @@ def tearDown(self): def test_only_conversation_is_fetched(self): self.mock_table.query.return_value = { - "Items": [{ - "PK": "user", - "SK": "user#CONV#1", - "Title": "Test Conversation", - "CreateTime": 1627984879.9, - "MessageMap": json.dumps({ - "system": { - "role": "system", - "content": [{"content_type": "text", "body": "Hello", "media_type": None}], - "model": "claude-instant-v1", - "children": [], - "parent": None, - "create_time": 1627984879.9, - "feedback": None, - "used_chunks": None, - "thinking_log": None - } - }), - "BotId": None - }] + "Items": [ + { + "PK": "user", + "SK": "user#CONV#1", + "Title": "Test Conversation", + "CreateTime": 1627984879.9, + "MessageMap": json.dumps( + { + "system": { + "role": "system", + "content": [ + { + "content_type": "text", + "body": "Hello", + "media_type": None, + } + ], + "model": "claude-instant-v1", + "children": [], + "parent": None, + "create_time": 1627984879.9, + "feedback": None, + "used_chunks": None, + "thinking_log": None, + } + } + ), + "BotId": None, + } + ] } conversations = find_conversation_by_user_id("user") self.assertEqual(len(conversations), 1) def test_only_bot_is_fetched(self): self.mock_table.query.return_value = { - "Items": [{ - "PK": "user", - "SK": "user#BOT#1", - "Title": "Test Bot", - "Description": "Test Bot Description", - "CreateTime": 1627984879.9, - "LastBotUsed": 1627984879.9, - "IsPinned": False, - "SyncStatus": "RUNNING", - "BedrockKnowledgeBase": None - }] + "Items": [ + { + "PK": "user", + "SK": "user#BOT#1", + "Title": "Test Bot", + "Description": "Test Bot Description", + "CreateTime": 1627984879.9, + "LastBotUsed": 1627984879.9, + "IsPinned": False, + "SyncStatus": "RUNNING", + "BedrockKnowledgeBase": None, + } + ] } bots = find_private_bots_by_user_id("user") self.assertEqual(len(bots), 1) + + def tearDown(self) -> None: - delete_conversation_by_user_id("user") - delete_bot_by_id("user", "1") - delete_bot_by_id("user", "2") + delete_conversation_by_user_id("user") + delete_bot_by_id("user", "1") + delete_bot_by_id("user", "2") + if __name__ == "__main__": unittest.main() diff --git a/frontend/src/hooks/useModel.ts b/frontend/src/hooks/useModel.ts index 009b55cb0..668fa436f 100644 --- a/frontend/src/hooks/useModel.ts +++ b/frontend/src/hooks/useModel.ts @@ -150,7 +150,6 @@ const useModel = (botId?: string | null, modelActivate?: ModelActivate) => { } }, [modelActivate, availableModels]); - const getDefaultModel = useCallback(() => { // check default model is available const defaultModelAvailable = filteredModels.some(m => m.modelId === DEFAULT_MODEL); @@ -208,7 +207,7 @@ const useModel = (botId?: string | null, modelActivate?: ModelActivate) => { } } } - }, [botId, previousBotId, botModelId, recentUseModelId, modelId, filteredModels, setModelId, selectModel, getDefaultModel]); + }, [botId, previousBotId, botModelId, recentUseModelId, modelId, filteredModels, setModelId, selectModel, getDefaultModel, modelActivate]); const model = useMemo(() => { return filteredModels.find((model) => model.modelId === modelId); diff --git a/frontend/src/pages/ChatPage.tsx b/frontend/src/pages/ChatPage.tsx index 987cbbbf8..4e99a7b9d 100644 --- a/frontend/src/pages/ChatPage.tsx +++ b/frontend/src/pages/ChatPage.tsx @@ -382,7 +382,7 @@ const ChatPage: React.FC = () => { const modelActivate = useMemo(() => { return bot?.modelActivate ?? defaultModelActivate; - }, [bot, bot?.modelActivate]); + }, [bot]); return (
Date: Wed, 27 Nov 2024 07:41:12 +0000 Subject: [PATCH 08/34] =?UTF-8?q?knowledge=20base=E3=81=AEid=E3=81=8Cdynam?= =?UTF-8?q?odb=E3=81=AB=E7=99=BB=E9=8C=B2=E3=81=95=E3=82=8C=E3=81=A6?= =?UTF-8?q?=E3=81=84=E3=81=AA=E3=81=84=E6=99=82=E3=81=ABchat=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=81=A8backend=E3=81=AB=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E3=83=AD=E3=82=B0=E3=81=8C=E5=87=BA=E3=82=8B=E4=BB=B6=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/usecases/chat.py | 5 +++++ backend/app/vector_search.py | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/backend/app/usecases/chat.py b/backend/app/usecases/chat.py index 7d211fe0d..b81f3a022 100644 --- a/backend/app/usecases/chat.py +++ b/backend/app/usecases/chat.py @@ -576,6 +576,11 @@ def fetch_related_documents( if not bot.display_retrieved_chunks: return None + # Check if bot has a properly configured knowledge base + if not bot.bedrock_knowledge_base or not bot.bedrock_knowledge_base.knowledge_base_id: + logger.warning("Bot does not have a properly configured Bedrock Knowledge Base") + return [] + query: str = chat_input.message.content[-1].body # type: ignore[assignment] chunks = search_related_docs(bot=bot, query=query) diff --git a/backend/app/vector_search.py b/backend/app/vector_search.py index cba8a44df..bc756e162 100644 --- a/backend/app/vector_search.py +++ b/backend/app/vector_search.py @@ -77,7 +77,10 @@ def get_source_link(source: str) -> tuple[Literal["s3", "url"], str]: def _bedrock_knowledge_base_search(bot: BotModel, query: str) -> list[SearchResult]: - assert bot.bedrock_knowledge_base is not None + if not bot.bedrock_knowledge_base or not bot.bedrock_knowledge_base.knowledge_base_id: + logger.warning("Bedrock Knowledge Base or Knowledge Base ID is not configured") + return [] + if bot.bedrock_knowledge_base.search_params.search_type == "semantic": search_type = "SEMANTIC" elif bot.bedrock_knowledge_base.search_params.search_type == "hybrid": From 74b936fcd4e7d8d7089c7c775761e69100c1a2c7 Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Thu, 28 Nov 2024 09:59:02 +0000 Subject: [PATCH 09/34] wip --- backend/app/repositories/custom_bot.py | 45 +- backend/app/repositories/models/custom_bot.py | 50 +- backend/app/routes/bot.py | 9 +- backend/app/routes/schemas/bot.py | 70 +- backend/app/usecases/bot.py | 55 +- backend/app/usecases/chat.py | 5 +- backend/app/vector_search.py | 5 +- backend/poetry.lock | 735 +++++------------- backend/pyproject.toml | 1 - frontend/src/@types/bot.d.ts | 21 +- frontend/src/@types/conversation.d.ts | 1 + .../components/SwitchBedrockModel.stories.tsx | 14 +- .../src/components/SwitchBedrockModel.tsx | 13 +- frontend/src/constants/index.ts | 15 + .../knowledgeBase/pages/BotKbEditPage.tsx | 56 +- frontend/src/hooks/useModel.ts | 52 +- frontend/src/pages/ChatPage.tsx | 26 +- frontend/src/utils/StringUtils.ts | 14 + 18 files changed, 396 insertions(+), 791 deletions(-) create mode 100644 frontend/src/utils/StringUtils.ts diff --git a/backend/app/repositories/custom_bot.py b/backend/app/repositories/custom_bot.py index 10cecf271..1d643e4b9 100644 --- a/backend/app/repositories/custom_bot.py +++ b/backend/app/repositories/custom_bot.py @@ -113,10 +113,10 @@ def update_bot( sync_status: type_sync_status, sync_status_reason: str, display_retrieved_chunks: bool, + model_activate: ModelActivateModel, conversation_quick_starters: list[ConversationQuickStarterModel], bedrock_knowledge_base: BedrockKnowledgeBaseModel | None = None, bedrock_guardrails: BedrockGuardrailsModel | None = None, - model_activate: ModelActivateModel | None = None, ): """Update bot title, description, and instruction. NOTE: Use `update_bot_visibility` to update visibility. @@ -203,39 +203,14 @@ def store_alias(user_id: str, alias: BotAliasModel): "ConversationQuickStarters": [ starter.model_dump() for starter in alias.conversation_quick_starters ], - "ModelActivate": ( - alias.model_activate.model_dump() if alias.model_activate else None - ), } + if alias.model_activate is not None: + item["ModelActivate"] = alias.model_activate.model_dump() response = table.put_item(Item=item) return response -def update_bot_model_activate(user_id: str, bot: BotModel): - """Update bot model activate.""" - table = _get_table_client(user_id) - logger.info(f"Updating bot model activate: {bot.id}") - - try: - response = table.update_item( - Key={"PK": user_id, "SK": compose_bot_alias_id(user_id, bot.id)}, - UpdateExpression="SET ModelActivate = :val", - ExpressionAttributeValues={ - ":val": bot.model_activate.model_dump() if bot.model_activate else None - }, - ConditionExpression="attribute_exists(PK) AND attribute_exists(SK)", - ) - print(f"update_bot_model_activate response: {response}") - except ClientError as e: - if e.response["Error"]["Code"] == "ConditionalCheckFailedException": - raise RecordNotFoundError(f"Alias with id {bot.id} not found") - else: - raise e - - return response - - def update_bot_last_used_time(user_id: str, bot_id: str): """Update last used time for bot.""" table = _get_table_client(user_id) @@ -521,11 +496,7 @@ def find_private_bot_by_id(user_id: str, bot_id: str) -> BotModel: if "GuardrailsParams" in item else None ), - model_activate=( - ModelActivateModel(**item["ModelActivate"]) - if "ModelActivate" in item - else None - ), + model_activate=ModelActivateModel.create(item.get("ModelActivate")), ) logger.info(f"Found bot: {bot}") @@ -605,11 +576,7 @@ def find_public_bot_by_id(bot_id: str) -> BotModel: if "GuardrailsParams" in item else None ), - model_activate=( - ModelActivateModel(**item["ModelActivate"]) - if "ModelActivate" in item - else None - ), + model_activate=ModelActivateModel.create(item.get("ModelActivate")), ) logger.info(f"Found public bot: {bot}") return bot @@ -639,7 +606,7 @@ def find_alias_by_id(user_id: str, alias_id: str) -> BotAliasModel: has_knowledge=item["HasKnowledge"], has_agent=item.get("HasAgent", False), conversation_quick_starters=item.get("ConversationQuickStarters", []), - model_activate=item.get("ModelActivate", None), + model_activate=ModelActivateModel.create(item.get("ModelActivate")), ) logger.info(f"Found alias: {bot}") diff --git a/backend/app/repositories/models/custom_bot.py b/backend/app/repositories/models/custom_bot.py index d2a69bb4e..240e14e89 100644 --- a/backend/app/repositories/models/custom_bot.py +++ b/backend/app/repositories/models/custom_bot.py @@ -1,9 +1,31 @@ -from typing import Optional +from typing import Optional, get_args, Dict, Any from app.repositories.models.common import Float from app.repositories.models.custom_bot_guardrails import BedrockGuardrailsModel from app.repositories.models.custom_bot_kb import BedrockKnowledgeBaseModel from app.routes.schemas.bot import type_sync_status -from pydantic import BaseModel +from pydantic import BaseModel, Field, ConfigDict +from app.routes.schemas.conversation import type_model_name + + +class ModelActivateModel(BaseModel): + claude_instant_v1: bool = True + claude_v2: bool = True + claude_v3_sonnet: bool = True + claude_v3_5_sonnet: bool = True + claude_v3_5_sonnet_v2: bool = True + claude_v3_5_haiku: bool = True + claude_v3_haiku: bool = True + claude_v3_opus: bool = True + mistral_7b_instruct: bool = True + mistral_large: bool = True + mixtral_8x7b_instruct: bool = True + + @classmethod + def create(cls, data: Dict[str, Any] | None = None) -> "ModelActivateModel": + """Factory method to create an instance with optional data.""" + if data is None: + return cls() + return cls(**data) class KnowledgeModel(BaseModel): @@ -55,21 +77,6 @@ class ConversationQuickStarterModel(BaseModel): example: str -class ModelActivateModel(BaseModel): - # Claude models - claude3_sonnet_v1: Optional[bool] = None - claude3_haiku_v1: Optional[bool] = None - claude3_opus_v1: Optional[bool] = None - claude3_5_sonnet_v1: Optional[bool] = None - claude3_5_sonnet_v2: Optional[bool] = None - claude3_5_haiku_v1: Optional[bool] = None - - # Mistral models - mistral7b: Optional[bool] = None - mistral8x7b: Optional[bool] = None - mistralLarge: Optional[bool] = None - - class BotModel(BaseModel): id: str title: str @@ -94,7 +101,7 @@ class BotModel(BaseModel): conversation_quick_starters: list[ConversationQuickStarterModel] bedrock_knowledge_base: BedrockKnowledgeBaseModel | None bedrock_guardrails: BedrockGuardrailsModel | None - model_activate: ModelActivateModel | None + model_activate: ModelActivateModel def has_knowledge(self) -> bool: return ( @@ -108,7 +115,10 @@ def is_agent_enabled(self) -> bool: return len(self.agent.tools) > 0 def has_bedrock_knowledge_base(self) -> bool: - return self.bedrock_knowledge_base is not None + return ( + self.bedrock_knowledge_base is not None + and self.bedrock_knowledge_base.knowledge_base_id is not None + ) class BotAliasModel(BaseModel): @@ -123,7 +133,7 @@ class BotAliasModel(BaseModel): has_knowledge: bool has_agent: bool conversation_quick_starters: list[ConversationQuickStarterModel] - model_activate: ModelActivateModel | None + model_activate: ModelActivateModel class BotMeta(BaseModel): diff --git a/backend/app/routes/bot.py b/backend/app/routes/bot.py index 9b1cbe044..5c3446de8 100644 --- a/backend/app/routes/bot.py +++ b/backend/app/routes/bot.py @@ -1,4 +1,4 @@ -from typing import Literal +from typing import Literal, Dict, Any from app.dependencies import check_creating_bot_allowed from app.repositories.custom_bot import ( @@ -24,6 +24,7 @@ Knowledge, ModelActivateOutput, ) +from app.routes.schemas.conversation import type_model_name from app.usecases.bot import ( create_new_bot, fetch_all_bots, @@ -153,11 +154,7 @@ def get_private_bot(request: Request, bot_id: str): if bot.bedrock_guardrails else None ), - model_activate=( - ModelActivateOutput(**bot.model_activate.model_dump()) - if bot.model_activate - else None - ), + model_activate=(ModelActivateOutput(**bot.model_activate.model_dump())), ) return output diff --git a/backend/app/routes/schemas/bot.py b/backend/app/routes/schemas/bot.py index dab4aae16..28bafbdc4 100644 --- a/backend/app/routes/schemas/bot.py +++ b/backend/app/routes/schemas/bot.py @@ -1,17 +1,24 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Literal, Optional - +from typing import ( + TYPE_CHECKING, + Literal, + Optional, +) +from pydantic import ( + Field, + validator, +) from app.routes.schemas.base import BaseSchema from app.routes.schemas.bot_guardrails import ( BedrockGuardrailsInput, BedrockGuardrailsOutput, ) +from app.routes.schemas.conversation import type_model_name from app.routes.schemas.bot_kb import ( BedrockKnowledgeBaseInput, BedrockKnowledgeBaseOutput, ) -from pydantic import Field, root_validator, validator if TYPE_CHECKING: from app.repositories.models.custom_bot import BotModel @@ -28,34 +35,37 @@ ] +# Create concrete classes class ModelActivateInput(BaseSchema): - # Claude models - claude3_sonnet_v1: bool | None - claude3_haiku_v1: bool | None - claude3_opus_v1: bool | None - claude3_5_sonnet_v1: bool | None - claude3_5_sonnet_v2: bool | None - claude3_5_haiku_v1: bool | None + """Model activation input schema with fields matching type_model_name""" - # Mistral models - mistral7b: bool | None - mistral8x7b: bool | None - mistralLarge: bool | None + claude_instant_v1: bool = True + claude_v2: bool = True + claude_v3_sonnet: bool = True + claude_v3_5_sonnet: bool = True + claude_v3_5_sonnet_v2: bool = True + claude_v3_5_haiku: bool = True + claude_v3_haiku: bool = True + claude_v3_opus: bool = True + mistral_7b_instruct: bool = True + mistral_large: bool = True + mixtral_8x7b_instruct: bool = True class ModelActivateOutput(BaseSchema): - # Claude models - claude3_sonnet_v1: bool | None - claude3_haiku_v1: bool | None - claude3_opus_v1: bool | None - claude3_5_sonnet_v1: bool | None - claude3_5_sonnet_v2: bool | None - claude3_5_haiku_v1: bool | None + """Model activation output schema with fields matching type_model_name""" - # Mistral models - mistral7b: bool | None - mistral8x7b: bool | None - mistralLarge: bool | None + claude_instant_v1: bool = True + claude_v2: bool = True + claude_v3_sonnet: bool = True + claude_v3_5_sonnet: bool = True + claude_v3_5_sonnet_v2: bool = True + claude_v3_5_haiku: bool = True + claude_v3_haiku: bool = True + claude_v3_opus: bool = True + mistral_7b_instruct: bool = True + mistral_large: bool = True + mixtral_8x7b_instruct: bool = True class GenerationParams(BaseSchema): @@ -132,7 +142,7 @@ class BotInput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] | None bedrock_knowledge_base: BedrockKnowledgeBaseInput | None = None bedrock_guardrails: BedrockGuardrailsInput | None = None - model_activate: ModelActivateInput | None = None + model_activate: ModelActivateInput class BotModifyInput(BaseSchema): @@ -146,7 +156,7 @@ class BotModifyInput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] | None bedrock_knowledge_base: BedrockKnowledgeBaseInput | None = None bedrock_guardrails: BedrockGuardrailsInput | None = None - model_activate: ModelActivateInput | None = None + model_activate: ModelActivateInput def _has_update_files(self) -> bool: return self.knowledge is not None and ( @@ -260,7 +270,7 @@ class BotModifyOutput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] bedrock_knowledge_base: BedrockKnowledgeBaseOutput | None bedrock_guardrails: BedrockGuardrailsOutput | None - model_activate: ModelActivateOutput | None + model_activate: ModelActivateOutput class BotOutput(BaseSchema): @@ -284,7 +294,7 @@ class BotOutput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] bedrock_knowledge_base: BedrockKnowledgeBaseOutput | None bedrock_guardrails: BedrockGuardrailsOutput | None - model_activate: ModelActivateOutput | None + model_activate: ModelActivateOutput class BotMetaOutput(BaseSchema): @@ -315,7 +325,7 @@ class BotSummaryOutput(BaseSchema): sync_status: type_sync_status has_knowledge: bool conversation_quick_starters: list[ConversationQuickStarter] - model_activate: ModelActivateOutput | None + model_activate: ModelActivateOutput class BotSwitchVisibilityInput(BaseSchema): diff --git a/backend/app/usecases/bot.py b/backend/app/usecases/bot.py index 08134f12f..43bc7c535 100644 --- a/backend/app/usecases/bot.py +++ b/backend/app/usecases/bot.py @@ -25,7 +25,6 @@ update_bot, update_bot_last_used_time, update_bot_pin_status, - update_bot_model_activate, ) from app.repositories.models.custom_bot import ( AgentModel, @@ -53,6 +52,7 @@ GenerationParams, Knowledge, type_sync_status, + ModelActivateInput, ModelActivateOutput, ) from app.routes.schemas.bot_guardrails import BedrockGuardrailsOutput @@ -206,11 +206,7 @@ def create_new_bot(user_id: str, bot_input: BotInput) -> BotOutput: if bot_input.bedrock_guardrails else None ), - model_activate=( - ModelActivateModel(**bot_input.model_activate.model_dump()) - if bot_input.model_activate - else None - ), + model_activate=ModelActivateModel(**bot_input.model_activate.model_dump()), ), ) return BotOutput( @@ -263,11 +259,7 @@ def create_new_bot(user_id: str, bot_input: BotInput) -> BotOutput: if bot_input.bedrock_guardrails else None ), - model_activate=( - ModelActivateOutput(**bot_input.model_activate.model_dump()) - if bot_input.model_activate - else None - ), + model_activate=ModelActivateOutput(**bot_input.model_activate.model_dump()), ) @@ -374,11 +366,7 @@ def modify_owned_bot( if modify_input.bedrock_guardrails else None ), - model_activate=( - ModelActivateModel(**modify_input.model_activate.model_dump()) - if modify_input.model_activate - else None - ), + model_activate=ModelActivateModel(**modify_input.model_activate.model_dump()), ) return BotModifyOutput( @@ -422,11 +410,7 @@ def modify_owned_bot( if modify_input.bedrock_guardrails else None ), - model_activate=( - ModelActivateOutput(**modify_input.model_activate.model_dump()) - if modify_input.model_activate - else None - ), + model_activate=ModelActivateOutput(**modify_input.model_activate.model_dump()), ) @@ -528,6 +512,7 @@ def fetch_all_bots_by_user_id( ConversationQuickStarter(**starter) for starter in item.get("ConversationQuickStarters", []) ] + or bot.model_activate != item["ModelActivate"] ): # Update alias to the latest original bot store_alias( @@ -545,7 +530,7 @@ def fetch_all_bots_by_user_id( has_knowledge=bot.has_knowledge(), has_agent=bot.is_agent_enabled(), conversation_quick_starters=bot.conversation_quick_starters, - model_activate=bot.model_activate, + model_activate=ModelActivateModel(**bot.model_activate.model_dump()), ), ) @@ -642,11 +627,7 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: ) for starter in bot.conversation_quick_starters ], - model_activate=( - ModelActivateOutput(**bot.model_activate.model_dump()) - if bot.model_activate - else None - ), + model_activate=ModelActivateOutput(**bot.model_activate.model_dump()), ) except RecordNotFoundError: @@ -657,7 +638,6 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: # update bot model activate if alias is found. bot = find_public_bot_by_id(bot_id) - update_bot_model_activate(user_id, bot) return BotSummaryOutput( id=alias.id, @@ -682,12 +662,7 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: for starter in alias.conversation_quick_starters ] ), - # Update with bot.model_activate parameters - model_activate=( - ModelActivateOutput(**bot.model_activate.model_dump()) - if bot.model_activate - else None - ), + model_activate=ModelActivateOutput(**alias.model_activate.model_dump()), ) except RecordNotFoundError: pass @@ -717,11 +692,7 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: ) for starter in bot.conversation_quick_starters ], - model_activate=( - ModelActivateModel(**bot.model_activate.model_dump()) - if bot.model_activate - else None - ), + model_activate=ModelActivateModel(**bot.model_activate.model_dump()), ), ) return BotSummaryOutput( @@ -743,11 +714,7 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: ) for starter in bot.conversation_quick_starters ], - model_activate=( - ModelActivateOutput(**bot.model_activate.model_dump()) - if bot.model_activate - else None - ), + model_activate=ModelActivateOutput(**bot.model_activate.model_dump()), ) except RecordNotFoundError: raise RecordNotFoundError( diff --git a/backend/app/usecases/chat.py b/backend/app/usecases/chat.py index b81f3a022..182e7ed22 100644 --- a/backend/app/usecases/chat.py +++ b/backend/app/usecases/chat.py @@ -577,7 +577,10 @@ def fetch_related_documents( return None # Check if bot has a properly configured knowledge base - if not bot.bedrock_knowledge_base or not bot.bedrock_knowledge_base.knowledge_base_id: + if ( + not bot.bedrock_knowledge_base + or not bot.bedrock_knowledge_base.knowledge_base_id + ): logger.warning("Bot does not have a properly configured Bedrock Knowledge Base") return [] diff --git a/backend/app/vector_search.py b/backend/app/vector_search.py index bc756e162..0adb78849 100644 --- a/backend/app/vector_search.py +++ b/backend/app/vector_search.py @@ -77,7 +77,10 @@ def get_source_link(source: str) -> tuple[Literal["s3", "url"], str]: def _bedrock_knowledge_base_search(bot: BotModel, query: str) -> list[SearchResult]: - if not bot.bedrock_knowledge_base or not bot.bedrock_knowledge_base.knowledge_base_id: + if ( + not bot.bedrock_knowledge_base + or not bot.bedrock_knowledge_base.knowledge_base_id + ): logger.warning("Bedrock Knowledge Base or Knowledge Base ID is not configured") return [] diff --git a/backend/poetry.lock b/backend/poetry.lock index 0419831f9..4dd4228b8 100644 --- a/backend/poetry.lock +++ b/backend/poetry.lock @@ -13,13 +13,13 @@ files = [ [[package]] name = "anyio" -version = "4.6.0" +version = "4.6.2.post1" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.9" files = [ - {file = "anyio-4.6.0-py3-none-any.whl", hash = "sha256:c7d2e9d63e31599eeb636c8c5c03a7e108d73b345f064f1c19fdc87b79036a9a"}, - {file = "anyio-4.6.0.tar.gz", hash = "sha256:137b4559cbb034c477165047febb6ff83f390fc3b20bf181c1fc0a728cb8beeb"}, + {file = "anyio-4.6.2.post1-py3-none-any.whl", hash = "sha256:6d170c36fba3bdd840c73d3868c1e777e33676a69c3a72cf0a0d5d6d8009b61d"}, + {file = "anyio-4.6.2.post1.tar.gz", hash = "sha256:4c8bc31ccdb51c7f7bd251f51c609e038d63e34219b44aa86e47576389880b4c"}, ] [package.dependencies] @@ -28,7 +28,7 @@ sniffio = ">=1.1" [package.extras] doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.21.0b1)"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21.0b1)"] trio = ["trio (>=0.26.1)"] [[package]] @@ -99,17 +99,17 @@ uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "boto3" -version = "1.35.37" +version = "1.35.70" description = "The AWS SDK for Python" optional = false python-versions = ">=3.8" files = [ - {file = "boto3-1.35.37-py3-none-any.whl", hash = "sha256:385ca77bf8ea4ab2d97f6e2435bdb29f77d9301e2f7ac796c2f465753c2adf3c"}, - {file = "boto3-1.35.37.tar.gz", hash = "sha256:470d981583885859fed2fd1c185eeb01cc03e60272d499bafe41b12625b158c8"}, + {file = "boto3-1.35.70-py3-none-any.whl", hash = "sha256:ca385708f83f01b3f27d9d675880d2458cb3b40ed1e25da688f551454ed0c112"}, + {file = "boto3-1.35.70.tar.gz", hash = "sha256:121dce8c7102eea6a6047d46bcd74e8a24dac793a4a3857de4f4bad9c12566fd"}, ] [package.dependencies] -botocore = ">=1.35.37,<1.36.0" +botocore = ">=1.35.70,<1.36.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.10.0,<0.11.0" @@ -118,13 +118,13 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.35.37" +version = "1.35.70" description = "Low-level, data-driven core of boto 3." optional = false python-versions = ">=3.8" files = [ - {file = "botocore-1.35.37-py3-none-any.whl", hash = "sha256:64f965d4ba7adb8d79ce044c3aef7356e05dd74753cf7e9115b80f477845d920"}, - {file = "botocore-1.35.37.tar.gz", hash = "sha256:b2b4d29bafd95b698344f2f0577bb67064adbf1735d8a0e3c7473daa59c23ba6"}, + {file = "botocore-1.35.70-py3-none-any.whl", hash = "sha256:ba8a4797cf7c5d9c237e67a62692f5146e895613fd3e6a43b00b66f3a8c7fc73"}, + {file = "botocore-1.35.70.tar.gz", hash = "sha256:18d1bb505722d9efd50c50719ed8de7284bfe6d3908a9e08756a7646e549da21"}, ] [package.dependencies] @@ -146,85 +146,6 @@ files = [ {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, ] -[[package]] -name = "cffi" -version = "1.17.1" -description = "Foreign Function Interface for Python calling C code." -optional = false -python-versions = ">=3.8" -files = [ - {file = "cffi-1.17.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14"}, - {file = "cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67"}, - {file = "cffi-1.17.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:edae79245293e15384b51f88b00613ba9f7198016a5948b5dddf4917d4d26382"}, - {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45398b671ac6d70e67da8e4224a065cec6a93541bb7aebe1b198a61b58c7b702"}, - {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ad9413ccdeda48c5afdae7e4fa2192157e991ff761e7ab8fdd8926f40b160cc3"}, - {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5da5719280082ac6bd9aa7becb3938dc9f9cbd57fac7d2871717b1feb0902ab6"}, - {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bb1a08b8008b281856e5971307cc386a8e9c5b625ac297e853d36da6efe9c17"}, - {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:045d61c734659cc045141be4bae381a41d89b741f795af1dd018bfb532fd0df8"}, - {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6883e737d7d9e4899a8a695e00ec36bd4e5e4f18fabe0aca0efe0a4b44cdb13e"}, - {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:6b8b4a92e1c65048ff98cfe1f735ef8f1ceb72e3d5f0c25fdb12087a23da22be"}, - {file = "cffi-1.17.1-cp310-cp310-win32.whl", hash = "sha256:c9c3d058ebabb74db66e431095118094d06abf53284d9c81f27300d0e0d8bc7c"}, - {file = "cffi-1.17.1-cp310-cp310-win_amd64.whl", hash = "sha256:0f048dcf80db46f0098ccac01132761580d28e28bc0f78ae0d58048063317e15"}, - {file = "cffi-1.17.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a45e3c6913c5b87b3ff120dcdc03f6131fa0065027d0ed7ee6190736a74cd401"}, - {file = "cffi-1.17.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:30c5e0cb5ae493c04c8b42916e52ca38079f1b235c2f8ae5f4527b963c401caf"}, - {file = "cffi-1.17.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f75c7ab1f9e4aca5414ed4d8e5c0e303a34f4421f8a0d47a4d019ceff0ab6af4"}, - {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1ed2dd2972641495a3ec98445e09766f077aee98a1c896dcb4ad0d303628e41"}, - {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:46bf43160c1a35f7ec506d254e5c890f3c03648a4dbac12d624e4490a7046cd1"}, - {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a24ed04c8ffd54b0729c07cee15a81d964e6fee0e3d4d342a27b020d22959dc6"}, - {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:610faea79c43e44c71e1ec53a554553fa22321b65fae24889706c0a84d4ad86d"}, - {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a9b15d491f3ad5d692e11f6b71f7857e7835eb677955c00cc0aefcd0669adaf6"}, - {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:de2ea4b5833625383e464549fec1bc395c1bdeeb5f25c4a3a82b5a8c756ec22f"}, - {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b"}, - {file = "cffi-1.17.1-cp311-cp311-win32.whl", hash = "sha256:85a950a4ac9c359340d5963966e3e0a94a676bd6245a4b55bc43949eee26a655"}, - {file = "cffi-1.17.1-cp311-cp311-win_amd64.whl", hash = "sha256:caaf0640ef5f5517f49bc275eca1406b0ffa6aa184892812030f04c2abf589a0"}, - {file = "cffi-1.17.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:805b4371bf7197c329fcb3ead37e710d1bca9da5d583f5073b799d5c5bd1eee4"}, - {file = "cffi-1.17.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:733e99bc2df47476e3848417c5a4540522f234dfd4ef3ab7fafdf555b082ec0c"}, - {file = "cffi-1.17.1-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1257bdabf294dceb59f5e70c64a3e2f462c30c7ad68092d01bbbfb1c16b1ba36"}, - {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da95af8214998d77a98cc14e3a3bd00aa191526343078b530ceb0bd710fb48a5"}, - {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d63afe322132c194cf832bfec0dc69a99fb9bb6bbd550f161a49e9e855cc78ff"}, - {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f79fc4fc25f1c8698ff97788206bb3c2598949bfe0fef03d299eb1b5356ada99"}, - {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b62ce867176a75d03a665bad002af8e6d54644fad99a3c70905c543130e39d93"}, - {file = "cffi-1.17.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:386c8bf53c502fff58903061338ce4f4950cbdcb23e2902d86c0f722b786bbe3"}, - {file = "cffi-1.17.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4ceb10419a9adf4460ea14cfd6bc43d08701f0835e979bf821052f1805850fe8"}, - {file = "cffi-1.17.1-cp312-cp312-win32.whl", hash = "sha256:a08d7e755f8ed21095a310a693525137cfe756ce62d066e53f502a83dc550f65"}, - {file = "cffi-1.17.1-cp312-cp312-win_amd64.whl", hash = "sha256:51392eae71afec0d0c8fb1a53b204dbb3bcabcb3c9b807eedf3e1e6ccf2de903"}, - {file = "cffi-1.17.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f3a2b4222ce6b60e2e8b337bb9596923045681d71e5a082783484d845390938e"}, - {file = "cffi-1.17.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2"}, - {file = "cffi-1.17.1-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d01b12eeeb4427d3110de311e1774046ad344f5b1a7403101878976ecd7a10f3"}, - {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:706510fe141c86a69c8ddc029c7910003a17353970cff3b904ff0686a5927683"}, - {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de55b766c7aa2e2a3092c51e0483d700341182f08e67c63630d5b6f200bb28e5"}, - {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c59d6e989d07460165cc5ad3c61f9fd8f1b4796eacbd81cee78957842b834af4"}, - {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd398dbc6773384a17fe0d3e7eeb8d1a21c2200473ee6806bb5e6a8e62bb73dd"}, - {file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed"}, - {file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9"}, - {file = "cffi-1.17.1-cp313-cp313-win32.whl", hash = "sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d"}, - {file = "cffi-1.17.1-cp313-cp313-win_amd64.whl", hash = "sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a"}, - {file = "cffi-1.17.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:636062ea65bd0195bc012fea9321aca499c0504409f413dc88af450b57ffd03b"}, - {file = "cffi-1.17.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c7eac2ef9b63c79431bc4b25f1cd649d7f061a28808cbc6c47b534bd789ef964"}, - {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e221cf152cff04059d011ee126477f0d9588303eb57e88923578ace7baad17f9"}, - {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:31000ec67d4221a71bd3f67df918b1f88f676f1c3b535a7eb473255fdc0b83fc"}, - {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f17be4345073b0a7b8ea599688f692ac3ef23ce28e5df79c04de519dbc4912c"}, - {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2b1fac190ae3ebfe37b979cc1ce69c81f4e4fe5746bb401dca63a9062cdaf1"}, - {file = "cffi-1.17.1-cp38-cp38-win32.whl", hash = "sha256:7596d6620d3fa590f677e9ee430df2958d2d6d6de2feeae5b20e82c00b76fbf8"}, - {file = "cffi-1.17.1-cp38-cp38-win_amd64.whl", hash = "sha256:78122be759c3f8a014ce010908ae03364d00a1f81ab5c7f4a7a5120607ea56e1"}, - {file = "cffi-1.17.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b2ab587605f4ba0bf81dc0cb08a41bd1c0a5906bd59243d56bad7668a6fc6c16"}, - {file = "cffi-1.17.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:28b16024becceed8c6dfbc75629e27788d8a3f9030691a1dbf9821a128b22c36"}, - {file = "cffi-1.17.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1d599671f396c4723d016dbddb72fe8e0397082b0a77a4fab8028923bec050e8"}, - {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca74b8dbe6e8e8263c0ffd60277de77dcee6c837a3d0881d8c1ead7268c9e576"}, - {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87"}, - {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98e3969bcff97cae1b2def8ba499ea3d6f31ddfdb7635374834cf89a1a08ecf0"}, - {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cdf5ce3acdfd1661132f2a9c19cac174758dc2352bfe37d98aa7512c6b7178b3"}, - {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9755e4345d1ec879e3849e62222a18c7174d65a6a92d5b346b1863912168b595"}, - {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f1e22e8c4419538cb197e4dd60acc919d7696e5ef98ee4da4e01d3f8cfa4cc5a"}, - {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c03e868a0b3bc35839ba98e74211ed2b05d2119be4e8a0f224fba9384f1fe02e"}, - {file = "cffi-1.17.1-cp39-cp39-win32.whl", hash = "sha256:e31ae45bc2e29f6b2abd0de1cc3b9d5205aa847cafaecb8af1476a609a2f6eb7"}, - {file = "cffi-1.17.1-cp39-cp39-win_amd64.whl", hash = "sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662"}, - {file = "cffi-1.17.1.tar.gz", hash = "sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"}, -] - -[package.dependencies] -pycparser = "*" - [[package]] name = "charset-normalizer" version = "3.4.0" @@ -364,55 +285,6 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] -[[package]] -name = "cryptography" -version = "43.0.3" -description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." -optional = false -python-versions = ">=3.7" -files = [ - {file = "cryptography-43.0.3-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:bf7a1932ac4176486eab36a19ed4c0492da5d97123f1406cf15e41b05e787d2e"}, - {file = "cryptography-43.0.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63efa177ff54aec6e1c0aefaa1a241232dcd37413835a9b674b6e3f0ae2bfd3e"}, - {file = "cryptography-43.0.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e1ce50266f4f70bf41a2c6dc4358afadae90e2a1e5342d3c08883df1675374f"}, - {file = "cryptography-43.0.3-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:443c4a81bb10daed9a8f334365fe52542771f25aedaf889fd323a853ce7377d6"}, - {file = "cryptography-43.0.3-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:74f57f24754fe349223792466a709f8e0c093205ff0dca557af51072ff47ab18"}, - {file = "cryptography-43.0.3-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:9762ea51a8fc2a88b70cf2995e5675b38d93bf36bd67d91721c309df184f49bd"}, - {file = "cryptography-43.0.3-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:81ef806b1fef6b06dcebad789f988d3b37ccaee225695cf3e07648eee0fc6b73"}, - {file = "cryptography-43.0.3-cp37-abi3-win32.whl", hash = "sha256:cbeb489927bd7af4aa98d4b261af9a5bc025bd87f0e3547e11584be9e9427be2"}, - {file = "cryptography-43.0.3-cp37-abi3-win_amd64.whl", hash = "sha256:f46304d6f0c6ab8e52770addfa2fc41e6629495548862279641972b6215451cd"}, - {file = "cryptography-43.0.3-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:8ac43ae87929a5982f5948ceda07001ee5e83227fd69cf55b109144938d96984"}, - {file = "cryptography-43.0.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:846da004a5804145a5f441b8530b4bf35afbf7da70f82409f151695b127213d5"}, - {file = "cryptography-43.0.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f996e7268af62598f2fc1204afa98a3b5712313a55c4c9d434aef49cadc91d4"}, - {file = "cryptography-43.0.3-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:f7b178f11ed3664fd0e995a47ed2b5ff0a12d893e41dd0494f406d1cf555cab7"}, - {file = "cryptography-43.0.3-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:c2e6fc39c4ab499049df3bdf567f768a723a5e8464816e8f009f121a5a9f4405"}, - {file = "cryptography-43.0.3-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:e1be4655c7ef6e1bbe6b5d0403526601323420bcf414598955968c9ef3eb7d16"}, - {file = "cryptography-43.0.3-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:df6b6c6d742395dd77a23ea3728ab62f98379eff8fb61be2744d4679ab678f73"}, - {file = "cryptography-43.0.3-cp39-abi3-win32.whl", hash = "sha256:d56e96520b1020449bbace2b78b603442e7e378a9b3bd68de65c782db1507995"}, - {file = "cryptography-43.0.3-cp39-abi3-win_amd64.whl", hash = "sha256:0c580952eef9bf68c4747774cde7ec1d85a6e61de97281f2dba83c7d2c806362"}, - {file = "cryptography-43.0.3-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:d03b5621a135bffecad2c73e9f4deb1a0f977b9a8ffe6f8e002bf6c9d07b918c"}, - {file = "cryptography-43.0.3-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:a2a431ee15799d6db9fe80c82b055bae5a752bef645bba795e8e52687c69efe3"}, - {file = "cryptography-43.0.3-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:281c945d0e28c92ca5e5930664c1cefd85efe80e5c0d2bc58dd63383fda29f83"}, - {file = "cryptography-43.0.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:f18c716be16bc1fea8e95def49edf46b82fccaa88587a45f8dc0ff6ab5d8e0a7"}, - {file = "cryptography-43.0.3-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:4a02ded6cd4f0a5562a8887df8b3bd14e822a90f97ac5e544c162899bc467664"}, - {file = "cryptography-43.0.3-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:53a583b6637ab4c4e3591a15bc9db855b8d9dee9a669b550f311480acab6eb08"}, - {file = "cryptography-43.0.3-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:1ec0bcf7e17c0c5669d881b1cd38c4972fade441b27bda1051665faaa89bdcaa"}, - {file = "cryptography-43.0.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2ce6fae5bdad59577b44e4dfed356944fbf1d925269114c28be377692643b4ff"}, - {file = "cryptography-43.0.3.tar.gz", hash = "sha256:315b9001266a492a6ff443b61238f956b214dbec9910a081ba5b6646a055a805"}, -] - -[package.dependencies] -cffi = {version = ">=1.12", markers = "platform_python_implementation != \"PyPy\""} - -[package.extras] -docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=1.1.1)"] -docstest = ["pyenchant (>=1.6.11)", "readme-renderer", "sphinxcontrib-spelling (>=4.0.1)"] -nox = ["nox"] -pep8test = ["check-sdist", "click", "mypy", "ruff"] -sdist = ["build"] -ssh = ["bcrypt (>=3.1.5)"] -test = ["certifi", "cryptography-vectors (==43.0.3)", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] -test-randomorder = ["pytest-randomly"] - [[package]] name = "decorator" version = "5.1.1" @@ -426,18 +298,18 @@ files = [ [[package]] name = "duckduckgo-search" -version = "6.3.0" +version = "6.3.7" description = "Search for words, documents, images, news, maps and text translation using the DuckDuckGo.com search engine." optional = false python-versions = ">=3.8" files = [ - {file = "duckduckgo_search-6.3.0-py3-none-any.whl", hash = "sha256:9a231a7b325226811cf7d35a240f3f501e718ae10a1aa0a638cabc80e129dfe7"}, - {file = "duckduckgo_search-6.3.0.tar.gz", hash = "sha256:e9f56955569325a7d9cacda2488ca78bf6629a459e74415892bee560b664f5eb"}, + {file = "duckduckgo_search-6.3.7-py3-none-any.whl", hash = "sha256:6a831a27977751e8928222f04c99a5d069ff80e2a7c78b699c9b9ac6cb48c41b"}, + {file = "duckduckgo_search-6.3.7.tar.gz", hash = "sha256:53d84966429a6377647e2a1ea7224b657575c7a4d506729bdb837e4ee12915ed"}, ] [package.dependencies] click = ">=8.1.7" -primp = ">=0.6.3" +primp = ">=0.8.1" [package.extras] dev = ["mypy (>=1.11.1)", "pytest (>=8.3.1)", "pytest-asyncio (>=0.23.8)", "ruff (>=0.6.1)"] @@ -463,18 +335,18 @@ gmpy2 = ["gmpy2"] [[package]] name = "fastapi" -version = "0.115.2" +version = "0.115.5" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = false python-versions = ">=3.8" files = [ - {file = "fastapi-0.115.2-py3-none-any.whl", hash = "sha256:61704c71286579cc5a598763905928f24ee98bfcc07aabe84cfefb98812bbc86"}, - {file = "fastapi-0.115.2.tar.gz", hash = "sha256:3995739e0b09fa12f984bce8fa9ae197b35d433750d3d312422d846e283697ee"}, + {file = "fastapi-0.115.5-py3-none-any.whl", hash = "sha256:596b95adbe1474da47049e802f9a65ab2ffa9c2b07e7efee70eb8a66c9f2f796"}, + {file = "fastapi-0.115.5.tar.gz", hash = "sha256:0e7a4d0dc0d01c68df21887cce0945e72d3c48b9f4f79dfe7a7d53aa08fbb289"}, ] [package.dependencies] pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0 || >2.0.0,<2.0.1 || >2.0.1,<2.1.0 || >2.1.0,<3.0.0" -starlette = ">=0.37.2,<0.41.0" +starlette = ">=0.40.0,<0.42.0" typing-extensions = ">=4.8.0" [package.extras] @@ -506,23 +378,6 @@ files = [ [package.extras] all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] -[[package]] -name = "jinja2" -version = "3.1.4" -description = "A very fast and expressive template engine." -optional = false -python-versions = ">=3.7" -files = [ - {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, - {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, -] - -[package.dependencies] -MarkupSafe = ">=2.0" - -[package.extras] -i18n = ["Babel (>=2.7)"] - [[package]] name = "jmespath" version = "1.0.1" @@ -548,156 +403,45 @@ files = [ [package.dependencies] six = "*" -[[package]] -name = "markupsafe" -version = "3.0.2" -description = "Safely add untrusted strings to HTML/XML markup." -optional = false -python-versions = ">=3.9" -files = [ - {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:38a9ef736c01fccdd6600705b09dc574584b89bea478200c5fbf112a6b0d5579"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bbcb445fa71794da8f178f0f6d66789a28d7319071af7a496d4d507ed566270d"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57cb5a3cf367aeb1d316576250f65edec5bb3be939e9247ae594b4bcbc317dfb"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3809ede931876f5b2ec92eef964286840ed3540dadf803dd570c3b7e13141a3b"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e07c3764494e3776c602c1e78e298937c3315ccc9043ead7e685b7f2b8d47b3c"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b424c77b206d63d500bcb69fa55ed8d0e6a3774056bdc4839fc9298a7edca171"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-win32.whl", hash = "sha256:fcabf5ff6eea076f859677f5f0b6b5c1a51e70a376b0579e0eadef8db48c6b50"}, - {file = "MarkupSafe-3.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:6af100e168aa82a50e186c82875a5893c5597a0c1ccdb0d8b40240b1f28b969a"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-win32.whl", hash = "sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d"}, - {file = "MarkupSafe-3.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-win32.whl", hash = "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30"}, - {file = "MarkupSafe-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-win32.whl", hash = "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1"}, - {file = "MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-win32.whl", hash = "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6"}, - {file = "MarkupSafe-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:eaa0a10b7f72326f1372a713e73c3f739b524b3af41feb43e4921cb529f5929a"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:48032821bbdf20f5799ff537c7ac3d1fba0ba032cfc06194faffa8cda8b560ff"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a9d3f5f0901fdec14d8d2f66ef7d035f2157240a433441719ac9a3fba440b13"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88b49a3b9ff31e19998750c38e030fc7bb937398b1f78cfa599aaef92d693144"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cfad01eed2c2e0c01fd0ecd2ef42c492f7f93902e39a42fc9ee1692961443a29"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:1225beacc926f536dc82e45f8a4d68502949dc67eea90eab715dea3a21c1b5f0"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:3169b1eefae027567d1ce6ee7cae382c57fe26e82775f460f0b2778beaad66c0"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:eb7972a85c54febfb25b5c4b4f3af4dcc731994c7da0d8a0b4a6eb0640e1d178"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-win32.whl", hash = "sha256:8c4e8c3ce11e1f92f6536ff07154f9d49677ebaaafc32db9db4620bc11ed480f"}, - {file = "MarkupSafe-3.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:6e296a513ca3d94054c2c881cc913116e90fd030ad1c656b3869762b754f5f8a"}, - {file = "markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0"}, -] - -[[package]] -name = "moto" -version = "5.0.21" -description = "" -optional = false -python-versions = ">=3.8" -files = [ - {file = "moto-5.0.21-py3-none-any.whl", hash = "sha256:1235b2ae3666459c9cc44504a5e73d35f4959b45e5876b2f6df2e5f4889dfb4f"}, - {file = "moto-5.0.21.tar.gz", hash = "sha256:52f63291daeff9444ef5eb14fbf69b24264567b79f184ae6aee4945d09845f06"}, -] - -[package.dependencies] -boto3 = ">=1.9.201" -botocore = ">=1.14.0,<1.35.45 || >1.35.45,<1.35.46 || >1.35.46" -cryptography = ">=3.3.1" -Jinja2 = ">=2.10.1" -python-dateutil = ">=2.1,<3.0.0" -requests = ">=2.5" -responses = ">=0.15.0" -werkzeug = ">=0.5,<2.2.0 || >2.2.0,<2.2.1 || >2.2.1" -xmltodict = "*" - -[package.extras] -all = ["PyYAML (>=5.1)", "antlr4-python3-runtime", "aws-xray-sdk (>=0.93,!=0.96)", "cfn-lint (>=0.40.0)", "docker (>=3.0.0)", "graphql-core", "joserfc (>=0.9.0)", "jsondiff (>=1.1.2)", "jsonpath-ng", "jsonschema", "multipart", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.6)", "pyparsing (>=3.0.7)", "setuptools"] -apigateway = ["PyYAML (>=5.1)", "joserfc (>=0.9.0)", "openapi-spec-validator (>=0.5.0)"] -apigatewayv2 = ["PyYAML (>=5.1)", "openapi-spec-validator (>=0.5.0)"] -appsync = ["graphql-core"] -awslambda = ["docker (>=3.0.0)"] -batch = ["docker (>=3.0.0)"] -cloudformation = ["PyYAML (>=5.1)", "aws-xray-sdk (>=0.93,!=0.96)", "cfn-lint (>=0.40.0)", "docker (>=3.0.0)", "graphql-core", "joserfc (>=0.9.0)", "jsondiff (>=1.1.2)", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.6)", "pyparsing (>=3.0.7)", "setuptools"] -cognitoidp = ["joserfc (>=0.9.0)"] -dynamodb = ["docker (>=3.0.0)", "py-partiql-parser (==0.5.6)"] -dynamodbstreams = ["docker (>=3.0.0)", "py-partiql-parser (==0.5.6)"] -events = ["jsonpath-ng"] -glue = ["pyparsing (>=3.0.7)"] -iotdata = ["jsondiff (>=1.1.2)"] -proxy = ["PyYAML (>=5.1)", "antlr4-python3-runtime", "aws-xray-sdk (>=0.93,!=0.96)", "cfn-lint (>=0.40.0)", "docker (>=2.5.1)", "graphql-core", "joserfc (>=0.9.0)", "jsondiff (>=1.1.2)", "jsonpath-ng", "multipart", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.6)", "pyparsing (>=3.0.7)", "setuptools"] -quicksight = ["jsonschema"] -resourcegroupstaggingapi = ["PyYAML (>=5.1)", "cfn-lint (>=0.40.0)", "docker (>=3.0.0)", "graphql-core", "joserfc (>=0.9.0)", "jsondiff (>=1.1.2)", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.6)", "pyparsing (>=3.0.7)"] -s3 = ["PyYAML (>=5.1)", "py-partiql-parser (==0.5.6)"] -s3crc32c = ["PyYAML (>=5.1)", "crc32c", "py-partiql-parser (==0.5.6)"] -server = ["PyYAML (>=5.1)", "antlr4-python3-runtime", "aws-xray-sdk (>=0.93,!=0.96)", "cfn-lint (>=0.40.0)", "docker (>=3.0.0)", "flask (!=2.2.0,!=2.2.1)", "flask-cors", "graphql-core", "joserfc (>=0.9.0)", "jsondiff (>=1.1.2)", "jsonpath-ng", "openapi-spec-validator (>=0.5.0)", "py-partiql-parser (==0.5.6)", "pyparsing (>=3.0.7)", "setuptools"] -ssm = ["PyYAML (>=5.1)"] -stepfunctions = ["antlr4-python3-runtime", "jsonpath-ng"] -xray = ["aws-xray-sdk (>=0.93,!=0.96)", "setuptools"] - [[package]] name = "mypy" -version = "1.11.2" +version = "1.13.0" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" files = [ - {file = "mypy-1.11.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d42a6dd818ffce7be66cce644f1dff482f1d97c53ca70908dff0b9ddc120b77a"}, - {file = "mypy-1.11.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:801780c56d1cdb896eacd5619a83e427ce436d86a3bdf9112527f24a66618fef"}, - {file = "mypy-1.11.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:41ea707d036a5307ac674ea172875f40c9d55c5394f888b168033177fce47383"}, - {file = "mypy-1.11.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:6e658bd2d20565ea86da7d91331b0eed6d2eee22dc031579e6297f3e12c758c8"}, - {file = "mypy-1.11.2-cp310-cp310-win_amd64.whl", hash = "sha256:478db5f5036817fe45adb7332d927daa62417159d49783041338921dcf646fc7"}, - {file = "mypy-1.11.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:75746e06d5fa1e91bfd5432448d00d34593b52e7e91a187d981d08d1f33d4385"}, - {file = "mypy-1.11.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a976775ab2256aadc6add633d44f100a2517d2388906ec4f13231fafbb0eccca"}, - {file = "mypy-1.11.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cd953f221ac1379050a8a646585a29574488974f79d8082cedef62744f0a0104"}, - {file = "mypy-1.11.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:57555a7715c0a34421013144a33d280e73c08df70f3a18a552938587ce9274f4"}, - {file = "mypy-1.11.2-cp311-cp311-win_amd64.whl", hash = "sha256:36383a4fcbad95f2657642a07ba22ff797de26277158f1cc7bd234821468b1b6"}, - {file = "mypy-1.11.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:e8960dbbbf36906c5c0b7f4fbf2f0c7ffb20f4898e6a879fcf56a41a08b0d318"}, - {file = "mypy-1.11.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:06d26c277962f3fb50e13044674aa10553981ae514288cb7d0a738f495550b36"}, - {file = "mypy-1.11.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6e7184632d89d677973a14d00ae4d03214c8bc301ceefcdaf5c474866814c987"}, - {file = "mypy-1.11.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3a66169b92452f72117e2da3a576087025449018afc2d8e9bfe5ffab865709ca"}, - {file = "mypy-1.11.2-cp312-cp312-win_amd64.whl", hash = "sha256:969ea3ef09617aff826885a22ece0ddef69d95852cdad2f60c8bb06bf1f71f70"}, - {file = "mypy-1.11.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:37c7fa6121c1cdfcaac97ce3d3b5588e847aa79b580c1e922bb5d5d2902df19b"}, - {file = "mypy-1.11.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4a8a53bc3ffbd161b5b2a4fff2f0f1e23a33b0168f1c0778ec70e1a3d66deb86"}, - {file = "mypy-1.11.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2ff93107f01968ed834f4256bc1fc4475e2fecf6c661260066a985b52741ddce"}, - {file = "mypy-1.11.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:edb91dded4df17eae4537668b23f0ff6baf3707683734b6a818d5b9d0c0c31a1"}, - {file = "mypy-1.11.2-cp38-cp38-win_amd64.whl", hash = "sha256:ee23de8530d99b6db0573c4ef4bd8f39a2a6f9b60655bf7a1357e585a3486f2b"}, - {file = "mypy-1.11.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:801ca29f43d5acce85f8e999b1e431fb479cb02d0e11deb7d2abb56bdaf24fd6"}, - {file = "mypy-1.11.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:af8d155170fcf87a2afb55b35dc1a0ac21df4431e7d96717621962e4b9192e70"}, - {file = "mypy-1.11.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f7821776e5c4286b6a13138cc935e2e9b6fde05e081bdebf5cdb2bb97c9df81d"}, - {file = "mypy-1.11.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:539c570477a96a4e6fb718b8d5c3e0c0eba1f485df13f86d2970c91f0673148d"}, - {file = "mypy-1.11.2-cp39-cp39-win_amd64.whl", hash = "sha256:3f14cd3d386ac4d05c5a39a51b84387403dadbd936e17cb35882134d4f8f0d24"}, - {file = "mypy-1.11.2-py3-none-any.whl", hash = "sha256:b499bc07dbdcd3de92b0a8b29fdf592c111276f6a12fe29c30f6c417dd546d12"}, - {file = "mypy-1.11.2.tar.gz", hash = "sha256:7f9993ad3e0ffdc95c2a14b66dee63729f021968bff8ad911867579c65d13a79"}, + {file = "mypy-1.13.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6607e0f1dd1fb7f0aca14d936d13fd19eba5e17e1cd2a14f808fa5f8f6d8f60a"}, + {file = "mypy-1.13.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8a21be69bd26fa81b1f80a61ee7ab05b076c674d9b18fb56239d72e21d9f4c80"}, + {file = "mypy-1.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7b2353a44d2179846a096e25691d54d59904559f4232519d420d64da6828a3a7"}, + {file = "mypy-1.13.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0730d1c6a2739d4511dc4253f8274cdd140c55c32dfb0a4cf8b7a43f40abfa6f"}, + {file = "mypy-1.13.0-cp310-cp310-win_amd64.whl", hash = "sha256:c5fc54dbb712ff5e5a0fca797e6e0aa25726c7e72c6a5850cfd2adbc1eb0a372"}, + {file = "mypy-1.13.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:581665e6f3a8a9078f28d5502f4c334c0c8d802ef55ea0e7276a6e409bc0d82d"}, + {file = "mypy-1.13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3ddb5b9bf82e05cc9a627e84707b528e5c7caaa1c55c69e175abb15a761cec2d"}, + {file = "mypy-1.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:20c7ee0bc0d5a9595c46f38beb04201f2620065a93755704e141fcac9f59db2b"}, + {file = "mypy-1.13.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3790ded76f0b34bc9c8ba4def8f919dd6a46db0f5a6610fb994fe8efdd447f73"}, + {file = "mypy-1.13.0-cp311-cp311-win_amd64.whl", hash = "sha256:51f869f4b6b538229c1d1bcc1dd7d119817206e2bc54e8e374b3dfa202defcca"}, + {file = "mypy-1.13.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:5c7051a3461ae84dfb5dd15eff5094640c61c5f22257c8b766794e6dd85e72d5"}, + {file = "mypy-1.13.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:39bb21c69a5d6342f4ce526e4584bc5c197fd20a60d14a8624d8743fffb9472e"}, + {file = "mypy-1.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:164f28cb9d6367439031f4c81e84d3ccaa1e19232d9d05d37cb0bd880d3f93c2"}, + {file = "mypy-1.13.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a4c1bfcdbce96ff5d96fc9b08e3831acb30dc44ab02671eca5953eadad07d6d0"}, + {file = "mypy-1.13.0-cp312-cp312-win_amd64.whl", hash = "sha256:a0affb3a79a256b4183ba09811e3577c5163ed06685e4d4b46429a271ba174d2"}, + {file = "mypy-1.13.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a7b44178c9760ce1a43f544e595d35ed61ac2c3de306599fa59b38a6048e1aa7"}, + {file = "mypy-1.13.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5d5092efb8516d08440e36626f0153b5006d4088c1d663d88bf79625af3d1d62"}, + {file = "mypy-1.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:de2904956dac40ced10931ac967ae63c5089bd498542194b436eb097a9f77bc8"}, + {file = "mypy-1.13.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:7bfd8836970d33c2105562650656b6846149374dc8ed77d98424b40b09340ba7"}, + {file = "mypy-1.13.0-cp313-cp313-win_amd64.whl", hash = "sha256:9f73dba9ec77acb86457a8fc04b5239822df0c14a082564737833d2963677dbc"}, + {file = "mypy-1.13.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:100fac22ce82925f676a734af0db922ecfea991e1d7ec0ceb1e115ebe501301a"}, + {file = "mypy-1.13.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7bcb0bb7f42a978bb323a7c88f1081d1b5dee77ca86f4100735a6f541299d8fb"}, + {file = "mypy-1.13.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bde31fc887c213e223bbfc34328070996061b0833b0a4cfec53745ed61f3519b"}, + {file = "mypy-1.13.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:07de989f89786f62b937851295ed62e51774722e5444a27cecca993fc3f9cd74"}, + {file = "mypy-1.13.0-cp38-cp38-win_amd64.whl", hash = "sha256:4bde84334fbe19bad704b3f5b78c4abd35ff1026f8ba72b29de70dda0916beb6"}, + {file = "mypy-1.13.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:0246bcb1b5de7f08f2826451abd947bf656945209b140d16ed317f65a17dc7dc"}, + {file = "mypy-1.13.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7f5b7deae912cf8b77e990b9280f170381fdfbddf61b4ef80927edd813163732"}, + {file = "mypy-1.13.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7029881ec6ffb8bc233a4fa364736789582c738217b133f1b55967115288a2bc"}, + {file = "mypy-1.13.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3e38b980e5681f28f033f3be86b099a247b13c491f14bb8b1e1e134d23bb599d"}, + {file = "mypy-1.13.0-cp39-cp39-win_amd64.whl", hash = "sha256:a6789be98a2017c912ae6ccb77ea553bbaf13d27605d2ca20a76dfbced631b24"}, + {file = "mypy-1.13.0-py3-none-any.whl", hash = "sha256:9c250883f9fd81d212e0952c92dbfcc96fc237f4b7c92f56ac81fd48460b3e5a"}, + {file = "mypy-1.13.0.tar.gz", hash = "sha256:0291a61b6fbf3e6673e3405cfcc0e7650bebc7939659fdca2702958038bd835e"}, ] [package.dependencies] @@ -706,6 +450,7 @@ typing-extensions = ">=4.6.0" [package.extras] dmypy = ["psutil (>=4.0)"] +faster-cache = ["orjson"] install-types = ["pip"] mypyc = ["setuptools (>=50)"] reports = ["lxml"] @@ -723,13 +468,13 @@ files = [ [[package]] name = "packaging" -version = "24.1" +version = "24.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, - {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, + {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, + {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, ] [[package]] @@ -776,19 +521,20 @@ type = ["mypy (>=1.11.2)"] [[package]] name = "primp" -version = "0.6.3" +version = "0.8.1" description = "HTTP client that can impersonate web browsers, mimicking their headers and `TLS/JA3/JA4/HTTP2` fingerprints" optional = false python-versions = ">=3.8" files = [ - {file = "primp-0.6.3-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:bdbe6a7cdaaf5c9ed863432a941f4a75bd4c6ff626cbc8d32fc232793c70ba06"}, - {file = "primp-0.6.3-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:eeb53eb987bdcbcd85740633470255cab887d921df713ffa12a36a13366c9cdb"}, - {file = "primp-0.6.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78da53d3c92a8e3f05bd3286ac76c291f1b6fe5e08ea63b7ba92b0f9141800bb"}, - {file = "primp-0.6.3-cp38-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:86337b44deecdac752bd8112909987fc9fa9b894f30191c80a164dc8f895da53"}, - {file = "primp-0.6.3-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:d3cd9a22b97f3eae42b2a5fb99f00480daf4cd6d9b139e05b0ffb03f7cc037f3"}, - {file = "primp-0.6.3-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:7732bec917e2d3c48a31cdb92e1250f4ad6203a1aa4f802bd9abd84f2286a1e0"}, - {file = "primp-0.6.3-cp38-abi3-win_amd64.whl", hash = "sha256:1e4113c34b86c676ae321af185f03a372caef3ee009f1682c2d62e30ec87348c"}, - {file = "primp-0.6.3.tar.gz", hash = "sha256:17d30ebe26864defad5232dbbe1372e80483940012356e1f68846bb182282039"}, + {file = "primp-0.8.1-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:8294db817701ad76b6a186c16e22cc49d36fac5986647a83657ad4a58ddeee42"}, + {file = "primp-0.8.1-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:e8117531dcdb0dbcf9855fdbac73febdde5967ca0332a2c05b5961d2fbcfe749"}, + {file = "primp-0.8.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:993cc4284e8c5c858254748f078e872ba250c9339d64398dc000a8f9cffadda3"}, + {file = "primp-0.8.1-cp38-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:4a27ac642be5c616fc5f139a5ad391dcd0c5964ace56fe6cf31cbffb972a7480"}, + {file = "primp-0.8.1-cp38-abi3-manylinux_2_34_armv7l.whl", hash = "sha256:e8483b8d9eec9fc43d77bb448555466030f29cdd99d9375eb75155e9f832e5bd"}, + {file = "primp-0.8.1-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:92f5f8267216252cfb27f2149811e14682bb64f0c5d37f00d218d1592e02f0b9"}, + {file = "primp-0.8.1-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:98f7f3a9481c55c56e7eff9024f29e16379a87d5b0a1b683e145dd8fcbdcc46b"}, + {file = "primp-0.8.1-cp38-abi3-win_amd64.whl", hash = "sha256:6f0018a26be787431504e32548b296a278abbe85da43bcbaf2d4982ac3dcd332"}, + {file = "primp-0.8.1.tar.gz", hash = "sha256:ddf05754a7b70d59df8a014a8585e418f9c04e0b69065bab6633f4a9b92bad93"}, ] [package.extras] @@ -816,32 +562,21 @@ files = [ {file = "pyasn1-0.6.1.tar.gz", hash = "sha256:6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034"}, ] -[[package]] -name = "pycparser" -version = "2.22" -description = "C parser in Python" -optional = false -python-versions = ">=3.8" -files = [ - {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, - {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, -] - [[package]] name = "pydantic" -version = "2.9.2" +version = "2.10.2" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.9.2-py3-none-any.whl", hash = "sha256:f048cec7b26778210e28a0459867920654d48e5e62db0958433636cde4254f12"}, - {file = "pydantic-2.9.2.tar.gz", hash = "sha256:d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f"}, + {file = "pydantic-2.10.2-py3-none-any.whl", hash = "sha256:cfb96e45951117c3024e6b67b25cdc33a3cb7b2fa62e239f7af1378358a1d99e"}, + {file = "pydantic-2.10.2.tar.gz", hash = "sha256:2bc2d7f17232e0841cbba4641e65ba1eb6fafb3a08de3a091ff3ce14a197c4fa"}, ] [package.dependencies] annotated-types = ">=0.6.0" -pydantic-core = "2.23.4" -typing-extensions = {version = ">=4.6.1", markers = "python_version < \"3.13\""} +pydantic-core = "2.27.1" +typing-extensions = ">=4.12.2" [package.extras] email = ["email-validator (>=2.0.0)"] @@ -849,100 +584,111 @@ timezone = ["tzdata"] [[package]] name = "pydantic-core" -version = "2.23.4" +version = "2.27.1" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.23.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:b10bd51f823d891193d4717448fab065733958bdb6a6b351967bd349d48d5c9b"}, - {file = "pydantic_core-2.23.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4fc714bdbfb534f94034efaa6eadd74e5b93c8fa6315565a222f7b6f42ca1166"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63e46b3169866bd62849936de036f901a9356e36376079b05efa83caeaa02ceb"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed1a53de42fbe34853ba90513cea21673481cd81ed1be739f7f2efb931b24916"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cfdd16ab5e59fc31b5e906d1a3f666571abc367598e3e02c83403acabc092e07"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:255a8ef062cbf6674450e668482456abac99a5583bbafb73f9ad469540a3a232"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a7cd62e831afe623fbb7aabbb4fe583212115b3ef38a9f6b71869ba644624a2"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f09e2ff1f17c2b51f2bc76d1cc33da96298f0a036a137f5440ab3ec5360b624f"}, - {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e38e63e6f3d1cec5a27e0afe90a085af8b6806ee208b33030e65b6516353f1a3"}, - {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0dbd8dbed2085ed23b5c04afa29d8fd2771674223135dc9bc937f3c09284d071"}, - {file = "pydantic_core-2.23.4-cp310-none-win32.whl", hash = "sha256:6531b7ca5f951d663c339002e91aaebda765ec7d61b7d1e3991051906ddde119"}, - {file = "pydantic_core-2.23.4-cp310-none-win_amd64.whl", hash = "sha256:7c9129eb40958b3d4500fa2467e6a83356b3b61bfff1b414c7361d9220f9ae8f"}, - {file = "pydantic_core-2.23.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:77733e3892bb0a7fa797826361ce8a9184d25c8dffaec60b7ffe928153680ba8"}, - {file = "pydantic_core-2.23.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b84d168f6c48fabd1f2027a3d1bdfe62f92cade1fb273a5d68e621da0e44e6d"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df49e7a0861a8c36d089c1ed57d308623d60416dab2647a4a17fe050ba85de0e"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ff02b6d461a6de369f07ec15e465a88895f3223eb75073ffea56b84d9331f607"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:996a38a83508c54c78a5f41456b0103c30508fed9abcad0a59b876d7398f25fd"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d97683ddee4723ae8c95d1eddac7c192e8c552da0c73a925a89fa8649bf13eea"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:216f9b2d7713eb98cb83c80b9c794de1f6b7e3145eef40400c62e86cee5f4e1e"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6f783e0ec4803c787bcea93e13e9932edab72068f68ecffdf86a99fd5918878b"}, - {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d0776dea117cf5272382634bd2a5c1b6eb16767c223c6a5317cd3e2a757c61a0"}, - {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d5f7a395a8cf1621939692dba2a6b6a830efa6b3cee787d82c7de1ad2930de64"}, - {file = "pydantic_core-2.23.4-cp311-none-win32.whl", hash = "sha256:74b9127ffea03643e998e0c5ad9bd3811d3dac8c676e47db17b0ee7c3c3bf35f"}, - {file = "pydantic_core-2.23.4-cp311-none-win_amd64.whl", hash = "sha256:98d134c954828488b153d88ba1f34e14259284f256180ce659e8d83e9c05eaa3"}, - {file = "pydantic_core-2.23.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f3e0da4ebaef65158d4dfd7d3678aad692f7666877df0002b8a522cdf088f231"}, - {file = "pydantic_core-2.23.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f69a8e0b033b747bb3e36a44e7732f0c99f7edd5cea723d45bc0d6e95377ffee"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:723314c1d51722ab28bfcd5240d858512ffd3116449c557a1336cbe3919beb87"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bb2802e667b7051a1bebbfe93684841cc9351004e2badbd6411bf357ab8d5ac8"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d18ca8148bebe1b0a382a27a8ee60350091a6ddaf475fa05ef50dc35b5df6327"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33e3d65a85a2a4a0dc3b092b938a4062b1a05f3a9abde65ea93b233bca0e03f2"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:128585782e5bfa515c590ccee4b727fb76925dd04a98864182b22e89a4e6ed36"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:68665f4c17edcceecc112dfed5dbe6f92261fb9d6054b47d01bf6371a6196126"}, - {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:20152074317d9bed6b7a95ade3b7d6054845d70584216160860425f4fbd5ee9e"}, - {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9261d3ce84fa1d38ed649c3638feefeae23d32ba9182963e465d58d62203bd24"}, - {file = "pydantic_core-2.23.4-cp312-none-win32.whl", hash = "sha256:4ba762ed58e8d68657fc1281e9bb72e1c3e79cc5d464be146e260c541ec12d84"}, - {file = "pydantic_core-2.23.4-cp312-none-win_amd64.whl", hash = "sha256:97df63000f4fea395b2824da80e169731088656d1818a11b95f3b173747b6cd9"}, - {file = "pydantic_core-2.23.4-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7530e201d10d7d14abce4fb54cfe5b94a0aefc87da539d0346a484ead376c3cc"}, - {file = "pydantic_core-2.23.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:df933278128ea1cd77772673c73954e53a1c95a4fdf41eef97c2b779271bd0bd"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cb3da3fd1b6a5d0279a01877713dbda118a2a4fc6f0d821a57da2e464793f05"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c6dcb030aefb668a2b7009c85b27f90e51e6a3b4d5c9bc4c57631292015b0d"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:696dd8d674d6ce621ab9d45b205df149399e4bb9aa34102c970b721554828510"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2971bb5ffe72cc0f555c13e19b23c85b654dd2a8f7ab493c262071377bfce9f6"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8394d940e5d400d04cad4f75c0598665cbb81aecefaca82ca85bd28264af7f9b"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0dff76e0602ca7d4cdaacc1ac4c005e0ce0dcfe095d5b5259163a80d3a10d327"}, - {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7d32706badfe136888bdea71c0def994644e09fff0bfe47441deaed8e96fdbc6"}, - {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ed541d70698978a20eb63d8c5d72f2cc6d7079d9d90f6b50bad07826f1320f5f"}, - {file = "pydantic_core-2.23.4-cp313-none-win32.whl", hash = "sha256:3d5639516376dce1940ea36edf408c554475369f5da2abd45d44621cb616f769"}, - {file = "pydantic_core-2.23.4-cp313-none-win_amd64.whl", hash = "sha256:5a1504ad17ba4210df3a045132a7baeeba5a200e930f57512ee02909fc5c4cb5"}, - {file = "pydantic_core-2.23.4-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d4488a93b071c04dc20f5cecc3631fc78b9789dd72483ba15d423b5b3689b555"}, - {file = "pydantic_core-2.23.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:81965a16b675b35e1d09dd14df53f190f9129c0202356ed44ab2728b1c905658"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ffa2ebd4c8530079140dd2d7f794a9d9a73cbb8e9d59ffe24c63436efa8f271"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:61817945f2fe7d166e75fbfb28004034b48e44878177fc54d81688e7b85a3665"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:29d2c342c4bc01b88402d60189f3df065fb0dda3654744d5a165a5288a657368"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5e11661ce0fd30a6790e8bcdf263b9ec5988e95e63cf901972107efc49218b13"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d18368b137c6295db49ce7218b1a9ba15c5bc254c96d7c9f9e924a9bc7825ad"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ec4e55f79b1c4ffb2eecd8a0cfba9955a2588497d96851f4c8f99aa4a1d39b12"}, - {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:374a5e5049eda9e0a44c696c7ade3ff355f06b1fe0bb945ea3cac2bc336478a2"}, - {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5c364564d17da23db1106787675fc7af45f2f7b58b4173bfdd105564e132e6fb"}, - {file = "pydantic_core-2.23.4-cp38-none-win32.whl", hash = "sha256:d7a80d21d613eec45e3d41eb22f8f94ddc758a6c4720842dc74c0581f54993d6"}, - {file = "pydantic_core-2.23.4-cp38-none-win_amd64.whl", hash = "sha256:5f5ff8d839f4566a474a969508fe1c5e59c31c80d9e140566f9a37bba7b8d556"}, - {file = "pydantic_core-2.23.4-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:a4fa4fc04dff799089689f4fd502ce7d59de529fc2f40a2c8836886c03e0175a"}, - {file = "pydantic_core-2.23.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0a7df63886be5e270da67e0966cf4afbae86069501d35c8c1b3b6c168f42cb36"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dcedcd19a557e182628afa1d553c3895a9f825b936415d0dbd3cd0bbcfd29b4b"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f54b118ce5de9ac21c363d9b3caa6c800341e8c47a508787e5868c6b79c9323"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:86d2f57d3e1379a9525c5ab067b27dbb8a0642fb5d454e17a9ac434f9ce523e3"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:de6d1d1b9e5101508cb37ab0d972357cac5235f5c6533d1071964c47139257df"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1278e0d324f6908e872730c9102b0112477a7f7cf88b308e4fc36ce1bdb6d58c"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9a6b5099eeec78827553827f4c6b8615978bb4b6a88e5d9b93eddf8bb6790f55"}, - {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:e55541f756f9b3ee346b840103f32779c695a19826a4c442b7954550a0972040"}, - {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a5c7ba8ffb6d6f8f2ab08743be203654bb1aaa8c9dcb09f82ddd34eadb695605"}, - {file = "pydantic_core-2.23.4-cp39-none-win32.whl", hash = "sha256:37b0fe330e4a58d3c58b24d91d1eb102aeec675a3db4c292ec3928ecd892a9a6"}, - {file = "pydantic_core-2.23.4-cp39-none-win_amd64.whl", hash = "sha256:1498bec4c05c9c787bde9125cfdcc63a41004ff167f495063191b863399b1a29"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f455ee30a9d61d3e1a15abd5068827773d6e4dc513e795f380cdd59932c782d5"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1e90d2e3bd2c3863d48525d297cd143fe541be8bbf6f579504b9712cb6b643ec"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e203fdf807ac7e12ab59ca2bfcabb38c7cf0b33c41efeb00f8e5da1d86af480"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e08277a400de01bc72436a0ccd02bdf596631411f592ad985dcee21445bd0068"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f220b0eea5965dec25480b6333c788fb72ce5f9129e8759ef876a1d805d00801"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d06b0c8da4f16d1d1e352134427cb194a0a6e19ad5db9161bf32b2113409e728"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ba1a0996f6c2773bd83e63f18914c1de3c9dd26d55f4ac302a7efe93fb8e7433"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:9a5bce9d23aac8f0cf0836ecfc033896aa8443b501c58d0602dbfd5bd5b37753"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:78ddaaa81421a29574a682b3179d4cf9e6d405a09b99d93ddcf7e5239c742e21"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:883a91b5dd7d26492ff2f04f40fbb652de40fcc0afe07e8129e8ae779c2110eb"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88ad334a15b32a791ea935af224b9de1bf99bcd62fabf745d5f3442199d86d59"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:233710f069d251feb12a56da21e14cca67994eab08362207785cf8c598e74577"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:19442362866a753485ba5e4be408964644dd6a09123d9416c54cd49171f50744"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:624e278a7d29b6445e4e813af92af37820fafb6dcc55c012c834f9e26f9aaaef"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f5ef8f42bec47f21d07668a043f077d507e5bf4e668d5c6dfe6aaba89de1a5b8"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:aea443fffa9fbe3af1a9ba721a87f926fe548d32cab71d188a6ede77d0ff244e"}, - {file = "pydantic_core-2.23.4.tar.gz", hash = "sha256:2584f7cf844ac4d970fba483a717dbe10c1c1c96a969bf65d61ffe94df1b2863"}, + {file = "pydantic_core-2.27.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:71a5e35c75c021aaf400ac048dacc855f000bdfed91614b4a726f7432f1f3d6a"}, + {file = "pydantic_core-2.27.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f82d068a2d6ecfc6e054726080af69a6764a10015467d7d7b9f66d6ed5afa23b"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:121ceb0e822f79163dd4699e4c54f5ad38b157084d97b34de8b232bcaad70278"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4603137322c18eaf2e06a4495f426aa8d8388940f3c457e7548145011bb68e05"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a33cd6ad9017bbeaa9ed78a2e0752c5e250eafb9534f308e7a5f7849b0b1bfb4"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:15cc53a3179ba0fcefe1e3ae50beb2784dede4003ad2dfd24f81bba4b23a454f"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45d9c5eb9273aa50999ad6adc6be5e0ecea7e09dbd0d31bd0c65a55a2592ca08"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8bf7b66ce12a2ac52d16f776b31d16d91033150266eb796967a7e4621707e4f6"}, + {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:655d7dd86f26cb15ce8a431036f66ce0318648f8853d709b4167786ec2fa4807"}, + {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:5556470f1a2157031e676f776c2bc20acd34c1990ca5f7e56f1ebf938b9ab57c"}, + {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f69ed81ab24d5a3bd93861c8c4436f54afdf8e8cc421562b0c7504cf3be58206"}, + {file = "pydantic_core-2.27.1-cp310-none-win32.whl", hash = "sha256:f5a823165e6d04ccea61a9f0576f345f8ce40ed533013580e087bd4d7442b52c"}, + {file = "pydantic_core-2.27.1-cp310-none-win_amd64.whl", hash = "sha256:57866a76e0b3823e0b56692d1a0bf722bffb324839bb5b7226a7dbd6c9a40b17"}, + {file = "pydantic_core-2.27.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ac3b20653bdbe160febbea8aa6c079d3df19310d50ac314911ed8cc4eb7f8cb8"}, + {file = "pydantic_core-2.27.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a5a8e19d7c707c4cadb8c18f5f60c843052ae83c20fa7d44f41594c644a1d330"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f7059ca8d64fea7f238994c97d91f75965216bcbe5f695bb44f354893f11d52"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bed0f8a0eeea9fb72937ba118f9db0cb7e90773462af7962d382445f3005e5a4"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a3cb37038123447cf0f3ea4c74751f6a9d7afef0eb71aa07bf5f652b5e6a132c"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84286494f6c5d05243456e04223d5a9417d7f443c3b76065e75001beb26f88de"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:acc07b2cfc5b835444b44a9956846b578d27beeacd4b52e45489e93276241025"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4fefee876e07a6e9aad7a8c8c9f85b0cdbe7df52b8a9552307b09050f7512c7e"}, + {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:258c57abf1188926c774a4c94dd29237e77eda19462e5bb901d88adcab6af919"}, + {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:35c14ac45fcfdf7167ca76cc80b2001205a8d5d16d80524e13508371fb8cdd9c"}, + {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d1b26e1dff225c31897696cab7d4f0a315d4c0d9e8666dbffdb28216f3b17fdc"}, + {file = "pydantic_core-2.27.1-cp311-none-win32.whl", hash = "sha256:2cdf7d86886bc6982354862204ae3b2f7f96f21a3eb0ba5ca0ac42c7b38598b9"}, + {file = "pydantic_core-2.27.1-cp311-none-win_amd64.whl", hash = "sha256:3af385b0cee8df3746c3f406f38bcbfdc9041b5c2d5ce3e5fc6637256e60bbc5"}, + {file = "pydantic_core-2.27.1-cp311-none-win_arm64.whl", hash = "sha256:81f2ec23ddc1b476ff96563f2e8d723830b06dceae348ce02914a37cb4e74b89"}, + {file = "pydantic_core-2.27.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9cbd94fc661d2bab2bc702cddd2d3370bbdcc4cd0f8f57488a81bcce90c7a54f"}, + {file = "pydantic_core-2.27.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5f8c4718cd44ec1580e180cb739713ecda2bdee1341084c1467802a417fe0f02"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:15aae984e46de8d376df515f00450d1522077254ef6b7ce189b38ecee7c9677c"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1ba5e3963344ff25fc8c40da90f44b0afca8cfd89d12964feb79ac1411a260ac"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:992cea5f4f3b29d6b4f7f1726ed8ee46c8331c6b4eed6db5b40134c6fe1768bb"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0325336f348dbee6550d129b1627cb8f5351a9dc91aad141ffb96d4937bd9529"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7597c07fbd11515f654d6ece3d0e4e5093edc30a436c63142d9a4b8e22f19c35"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3bbd5d8cc692616d5ef6fbbbd50dbec142c7e6ad9beb66b78a96e9c16729b089"}, + {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:dc61505e73298a84a2f317255fcc72b710b72980f3a1f670447a21efc88f8381"}, + {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:e1f735dc43da318cad19b4173dd1ffce1d84aafd6c9b782b3abc04a0d5a6f5bb"}, + {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f4e5658dbffe8843a0f12366a4c2d1c316dbe09bb4dfbdc9d2d9cd6031de8aae"}, + {file = "pydantic_core-2.27.1-cp312-none-win32.whl", hash = "sha256:672ebbe820bb37988c4d136eca2652ee114992d5d41c7e4858cdd90ea94ffe5c"}, + {file = "pydantic_core-2.27.1-cp312-none-win_amd64.whl", hash = "sha256:66ff044fd0bb1768688aecbe28b6190f6e799349221fb0de0e6f4048eca14c16"}, + {file = "pydantic_core-2.27.1-cp312-none-win_arm64.whl", hash = "sha256:9a3b0793b1bbfd4146304e23d90045f2a9b5fd5823aa682665fbdaf2a6c28f3e"}, + {file = "pydantic_core-2.27.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f216dbce0e60e4d03e0c4353c7023b202d95cbaeff12e5fd2e82ea0a66905073"}, + {file = "pydantic_core-2.27.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a2e02889071850bbfd36b56fd6bc98945e23670773bc7a76657e90e6b6603c08"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42b0e23f119b2b456d07ca91b307ae167cc3f6c846a7b169fca5326e32fdc6cf"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:764be71193f87d460a03f1f7385a82e226639732214b402f9aa61f0d025f0737"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1c00666a3bd2f84920a4e94434f5974d7bbc57e461318d6bb34ce9cdbbc1f6b2"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3ccaa88b24eebc0f849ce0a4d09e8a408ec5a94afff395eb69baf868f5183107"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c65af9088ac534313e1963443d0ec360bb2b9cba6c2909478d22c2e363d98a51"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:206b5cf6f0c513baffaeae7bd817717140770c74528f3e4c3e1cec7871ddd61a"}, + {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:062f60e512fc7fff8b8a9d680ff0ddaaef0193dba9fa83e679c0c5f5fbd018bc"}, + {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:a0697803ed7d4af5e4c1adf1670af078f8fcab7a86350e969f454daf598c4960"}, + {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:58ca98a950171f3151c603aeea9303ef6c235f692fe555e883591103da709b23"}, + {file = "pydantic_core-2.27.1-cp313-none-win32.whl", hash = "sha256:8065914ff79f7eab1599bd80406681f0ad08f8e47c880f17b416c9f8f7a26d05"}, + {file = "pydantic_core-2.27.1-cp313-none-win_amd64.whl", hash = "sha256:ba630d5e3db74c79300d9a5bdaaf6200172b107f263c98a0539eeecb857b2337"}, + {file = "pydantic_core-2.27.1-cp313-none-win_arm64.whl", hash = "sha256:45cf8588c066860b623cd11c4ba687f8d7175d5f7ef65f7129df8a394c502de5"}, + {file = "pydantic_core-2.27.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:5897bec80a09b4084aee23f9b73a9477a46c3304ad1d2d07acca19723fb1de62"}, + {file = "pydantic_core-2.27.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d0165ab2914379bd56908c02294ed8405c252250668ebcb438a55494c69f44ab"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b9af86e1d8e4cfc82c2022bfaa6f459381a50b94a29e95dcdda8442d6d83864"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f6c8a66741c5f5447e047ab0ba7a1c61d1e95580d64bce852e3df1f895c4067"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a42d6a8156ff78981f8aa56eb6394114e0dedb217cf8b729f438f643608cbcd"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64c65f40b4cd8b0e049a8edde07e38b476da7e3aaebe63287c899d2cff253fa5"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdcf339322a3fae5cbd504edcefddd5a50d9ee00d968696846f089b4432cf78"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bf99c8404f008750c846cb4ac4667b798a9f7de673ff719d705d9b2d6de49c5f"}, + {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8f1edcea27918d748c7e5e4d917297b2a0ab80cad10f86631e488b7cddf76a36"}, + {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:159cac0a3d096f79ab6a44d77a961917219707e2a130739c64d4dd46281f5c2a"}, + {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:029d9757eb621cc6e1848fa0b0310310de7301057f623985698ed7ebb014391b"}, + {file = "pydantic_core-2.27.1-cp38-none-win32.whl", hash = "sha256:a28af0695a45f7060e6f9b7092558a928a28553366519f64083c63a44f70e618"}, + {file = "pydantic_core-2.27.1-cp38-none-win_amd64.whl", hash = "sha256:2d4567c850905d5eaaed2f7a404e61012a51caf288292e016360aa2b96ff38d4"}, + {file = "pydantic_core-2.27.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:e9386266798d64eeb19dd3677051f5705bf873e98e15897ddb7d76f477131967"}, + {file = "pydantic_core-2.27.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4228b5b646caa73f119b1ae756216b59cc6e2267201c27d3912b592c5e323b60"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b3dfe500de26c52abe0477dde16192ac39c98f05bf2d80e76102d394bd13854"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:aee66be87825cdf72ac64cb03ad4c15ffef4143dbf5c113f64a5ff4f81477bf9"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b748c44bb9f53031c8cbc99a8a061bc181c1000c60a30f55393b6e9c45cc5bd"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ca038c7f6a0afd0b2448941b6ef9d5e1949e999f9e5517692eb6da58e9d44be"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e0bd57539da59a3e4671b90a502da9a28c72322a4f17866ba3ac63a82c4498e"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ac6c2c45c847bbf8f91930d88716a0fb924b51e0c6dad329b793d670ec5db792"}, + {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b94d4ba43739bbe8b0ce4262bcc3b7b9f31459ad120fb595627eaeb7f9b9ca01"}, + {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:00e6424f4b26fe82d44577b4c842d7df97c20be6439e8e685d0d715feceb9fb9"}, + {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:38de0a70160dd97540335b7ad3a74571b24f1dc3ed33f815f0880682e6880131"}, + {file = "pydantic_core-2.27.1-cp39-none-win32.whl", hash = "sha256:7ccebf51efc61634f6c2344da73e366c75e735960b5654b63d7e6f69a5885fa3"}, + {file = "pydantic_core-2.27.1-cp39-none-win_amd64.whl", hash = "sha256:a57847b090d7892f123726202b7daa20df6694cbd583b67a592e856bff603d6c"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3fa80ac2bd5856580e242dbc202db873c60a01b20309c8319b5c5986fbe53ce6"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d950caa237bb1954f1b8c9227b5065ba6875ac9771bb8ec790d956a699b78676"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e4216e64d203e39c62df627aa882f02a2438d18a5f21d7f721621f7a5d3611d"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:02a3d637bd387c41d46b002f0e49c52642281edacd2740e5a42f7017feea3f2c"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:161c27ccce13b6b0c8689418da3885d3220ed2eae2ea5e9b2f7f3d48f1d52c27"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:19910754e4cc9c63bc1c7f6d73aa1cfee82f42007e407c0f413695c2f7ed777f"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:e173486019cc283dc9778315fa29a363579372fe67045e971e89b6365cc035ed"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:af52d26579b308921b73b956153066481f064875140ccd1dfd4e77db89dbb12f"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:981fb88516bd1ae8b0cbbd2034678a39dedc98752f264ac9bc5839d3923fa04c"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5fde892e6c697ce3e30c61b239330fc5d569a71fefd4eb6512fc6caec9dd9e2f"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:816f5aa087094099fff7edabb5e01cc370eb21aa1a1d44fe2d2aefdfb5599b31"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c10c309e18e443ddb108f0ef64e8729363adbfd92d6d57beec680f6261556f3"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98476c98b02c8e9b2eec76ac4156fd006628b1b2d0ef27e548ffa978393fd154"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c3027001c28434e7ca5a6e1e527487051136aa81803ac812be51802150d880dd"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:7699b1df36a48169cdebda7ab5a2bac265204003f153b4bd17276153d997670a"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:1c39b07d90be6b48968ddc8c19e7585052088fd7ec8d568bb31ff64c70ae3c97"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:46ccfe3032b3915586e469d4972973f893c0a2bb65669194a5bdea9bacc088c2"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:62ba45e21cf6571d7f716d903b5b7b6d2617e2d5d67c0923dc47b9d41369f840"}, + {file = "pydantic_core-2.27.1.tar.gz", hash = "sha256:62a763352879b84aa31058fc931884055fd75089cccbd9d58bb6afd01141b235"}, ] [package.dependencies] @@ -1005,68 +751,6 @@ files = [ {file = "python_ulid-1.1.0-py3-none-any.whl", hash = "sha256:88c952f6be133dbede19c907d72d26717d2691ec8421512b573144794d891e24"}, ] -[[package]] -name = "pyyaml" -version = "6.0.2" -description = "YAML parser and emitter for Python" -optional = false -python-versions = ">=3.8" -files = [ - {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, - {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, - {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237"}, - {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b"}, - {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed"}, - {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180"}, - {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68"}, - {file = "PyYAML-6.0.2-cp310-cp310-win32.whl", hash = "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99"}, - {file = "PyYAML-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e"}, - {file = "PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774"}, - {file = "PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee"}, - {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c"}, - {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317"}, - {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85"}, - {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4"}, - {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e"}, - {file = "PyYAML-6.0.2-cp311-cp311-win32.whl", hash = "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5"}, - {file = "PyYAML-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44"}, - {file = "PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab"}, - {file = "PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725"}, - {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5"}, - {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425"}, - {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476"}, - {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48"}, - {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b"}, - {file = "PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4"}, - {file = "PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8"}, - {file = "PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba"}, - {file = "PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1"}, - {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133"}, - {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484"}, - {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5"}, - {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc"}, - {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652"}, - {file = "PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183"}, - {file = "PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563"}, - {file = "PyYAML-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a"}, - {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5"}, - {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d"}, - {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083"}, - {file = "PyYAML-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706"}, - {file = "PyYAML-6.0.2-cp38-cp38-win32.whl", hash = "sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a"}, - {file = "PyYAML-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff"}, - {file = "PyYAML-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d"}, - {file = "PyYAML-6.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f"}, - {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290"}, - {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12"}, - {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19"}, - {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e"}, - {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725"}, - {file = "PyYAML-6.0.2-cp39-cp39-win32.whl", hash = "sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631"}, - {file = "PyYAML-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8"}, - {file = "pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"}, -] - [[package]] name = "requests" version = "2.32.3" @@ -1088,25 +772,6 @@ urllib3 = ">=1.21.1,<3" socks = ["PySocks (>=1.5.6,!=1.5.7)"] use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] -[[package]] -name = "responses" -version = "0.25.3" -description = "A utility library for mocking out the `requests` Python library." -optional = false -python-versions = ">=3.8" -files = [ - {file = "responses-0.25.3-py3-none-any.whl", hash = "sha256:521efcbc82081ab8daa588e08f7e8a64ce79b91c39f6e62199b19159bea7dbcb"}, - {file = "responses-0.25.3.tar.gz", hash = "sha256:617b9247abd9ae28313d57a75880422d55ec63c29d33d629697590a034358dba"}, -] - -[package.dependencies] -pyyaml = "*" -requests = ">=2.30.0,<3.0" -urllib3 = ">=1.25.10,<3.0" - -[package.extras] -tests = ["coverage (>=6.0.0)", "flake8", "mypy", "pytest (>=7.0.0)", "pytest-asyncio", "pytest-cov", "pytest-httpserver", "tomli", "tomli-w", "types-PyYAML", "types-requests"] - [[package]] name = "retry" version = "0.9.2" @@ -1138,13 +803,13 @@ pyasn1 = ">=0.1.3" [[package]] name = "s3transfer" -version = "0.10.3" +version = "0.10.4" description = "An Amazon S3 Transfer Manager" optional = false python-versions = ">=3.8" files = [ - {file = "s3transfer-0.10.3-py3-none-any.whl", hash = "sha256:263ed587a5803c6c708d3ce44dc4dfedaab4c1a32e8329bab818933d79ddcf5d"}, - {file = "s3transfer-0.10.3.tar.gz", hash = "sha256:4f50ed74ab84d474ce614475e0b8d5047ff080810aac5d01ea25231cfc944b0c"}, + {file = "s3transfer-0.10.4-py3-none-any.whl", hash = "sha256:244a76a24355363a68164241438de1b72f8781664920260c48465896b712a41e"}, + {file = "s3transfer-0.10.4.tar.gz", hash = "sha256:29edc09801743c21eb5ecbc617a152df41d3c287f67b615f73e5f750583666a7"}, ] [package.dependencies] @@ -1191,13 +856,13 @@ files = [ [[package]] name = "starlette" -version = "0.40.0" +version = "0.41.3" description = "The little ASGI library that shines." optional = false python-versions = ">=3.8" files = [ - {file = "starlette-0.40.0-py3-none-any.whl", hash = "sha256:c494a22fae73805376ea6bf88439783ecfba9aac88a43911b48c653437e784c4"}, - {file = "starlette-0.40.0.tar.gz", hash = "sha256:1a3139688fb298ce5e2d661d37046a66ad996ce94be4d4983be019a23a04ea35"}, + {file = "starlette-0.41.3-py3-none-any.whl", hash = "sha256:44cedb2b7c77a9de33a8b74b2b90e9f50d11fcf25d8270ea525ad71a25374ff7"}, + {file = "starlette-0.41.3.tar.gz", hash = "sha256:0e4ab3d16522a255be6b28260b938eae2482f98ce5cc934cb08dce8dc3ba5835"}, ] [package.dependencies] @@ -1223,13 +888,13 @@ test = ["pytest", "tornado (>=4.5)", "typeguard"] [[package]] name = "types-requests" -version = "2.32.0.20240914" +version = "2.32.0.20241016" description = "Typing stubs for requests" optional = false python-versions = ">=3.8" files = [ - {file = "types-requests-2.32.0.20240914.tar.gz", hash = "sha256:2850e178db3919d9bf809e434eef65ba49d0e7e33ac92d588f4a5e295fffd405"}, - {file = "types_requests-2.32.0.20240914-py3-none-any.whl", hash = "sha256:59c2f673eb55f32a99b2894faf6020e1a9f4a402ad0f192bfee0b64469054310"}, + {file = "types-requests-2.32.0.20241016.tar.gz", hash = "sha256:0d9cad2f27515d0e3e3da7134a1b6f28fb97129d86b867f24d9c726452634d95"}, + {file = "types_requests-2.32.0.20241016-py3-none-any.whl", hash = "sha256:4195d62d6d3e043a4eaaf08ff8a62184584d2e8684e9d2aa178c7915a7da3747"}, ] [package.dependencies] @@ -1276,13 +941,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "uvicorn" -version = "0.23.2" +version = "0.32.1" description = "The lightning-fast ASGI server." optional = false python-versions = ">=3.8" files = [ - {file = "uvicorn-0.23.2-py3-none-any.whl", hash = "sha256:1f9be6558f01239d4fdf22ef8126c39cb1ad0addf76c40e760549d2c2f43ab53"}, - {file = "uvicorn-0.23.2.tar.gz", hash = "sha256:4d3cc12d7727ba72b64d12d3cc7743124074c0a69f7b201512fc50c3e3f1569a"}, + {file = "uvicorn-0.32.1-py3-none-any.whl", hash = "sha256:82ad92fd58da0d12af7482ecdb5f2470a04c9c9a53ced65b9bbb4a205377602e"}, + {file = "uvicorn-0.32.1.tar.gz", hash = "sha256:ee9519c246a72b1c084cea8d3b44ed6026e78a4a309cbedae9c37e4cb9fbb175"}, ] [package.dependencies] @@ -1290,37 +955,9 @@ click = ">=7.0" h11 = ">=0.8" [package.extras] -standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"] - -[[package]] -name = "werkzeug" -version = "3.1.3" -description = "The comprehensive WSGI web application library." -optional = false -python-versions = ">=3.9" -files = [ - {file = "werkzeug-3.1.3-py3-none-any.whl", hash = "sha256:54b78bf3716d19a65be4fceccc0d1d7b89e608834989dfae50ea87564639213e"}, - {file = "werkzeug-3.1.3.tar.gz", hash = "sha256:60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746"}, -] - -[package.dependencies] -MarkupSafe = ">=2.1.1" - -[package.extras] -watchdog = ["watchdog (>=2.3)"] - -[[package]] -name = "xmltodict" -version = "0.14.2" -description = "Makes working with XML feel like you are working with JSON" -optional = false -python-versions = ">=3.6" -files = [ - {file = "xmltodict-0.14.2-py2.py3-none-any.whl", hash = "sha256:20cc7d723ed729276e808f26fb6b3599f786cbc37e06c65e192ba77c40f20aac"}, - {file = "xmltodict-0.14.2.tar.gz", hash = "sha256:201e7c28bb210e374999d1dde6382923ab0ed1a8a5faeece48ab525b7810a553"}, -] +standard = ["colorama (>=0.4)", "httptools (>=0.6.3)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"] [metadata] lock-version = "2.0" python-versions = ">=3.11,<3.13" -content-hash = "7784d4fc73f13cb7a77814808ca2dc2120cc41613239827e16816d1805e9280b" +content-hash = "c3a4705bee027f05c7df8b2b4030f2e18d259b583f3400a591466d182fe25e70" diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 8f978c7a1..5f5e3b584 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -19,7 +19,6 @@ langdetect = "^1.0.9" retry = ">=0.9.2,<1" types-retry = ">=0.9.9.4,<1" duckduckgo-search = "^6.1.4" -moto = "^5.0.21" [tool.poetry.group.dev.dependencies] mypy = "^1.10.0" diff --git a/frontend/src/@types/bot.d.ts b/frontend/src/@types/bot.d.ts index 3959e823f..803af3b24 100644 --- a/frontend/src/@types/bot.d.ts +++ b/frontend/src/@types/bot.d.ts @@ -1,20 +1,9 @@ import { BedrockKnowledgeBase } from '../features/knowledgeBase/types'; - +import { Model } from './conversation' export type BotKind = 'private' | 'mixed'; -export type ModelActivate = { - // # Claude models - claude3SonnetV1?: boolean; - claude3HaikuV1?: boolean; - claude3OpusV1?: boolean; - claude35SonnetV1?: boolean; - claude35SonnetV2?: boolean; - claude35HaikuV1?: boolean; - - // Mistral models - mistral7b?: boolean - mistral8x7b?: boolean - mistralLarge?: boolean +type ModelActivate = { + [key: string]: boolean; }; export type BotMeta = { @@ -118,7 +107,7 @@ export type RegisterBotRequest = { conversationQuickStarters: ConversationQuickStarter[]; bedrockGuardrails?: GuardrailsParams; bedrockKnowledgeBase?: BedrockKnowledgeBase; - modelActivate?: ModelActivate; + modelActivate: ModelActivate; }; export type RegisterBotResponse = BotDetails; @@ -134,7 +123,7 @@ export type UpdateBotRequest = { conversationQuickStarters: ConversationQuickStarter[]; bedrockGuardrails?: GuardrailsParams; bedrockKnowledgeBase?: BedrockKnowledgeBase; - modelActivate?: ModelActivate; + modelActivate: ModelActivate; }; export type UpdateBotResponse = { diff --git a/frontend/src/@types/conversation.d.ts b/frontend/src/@types/conversation.d.ts index f4729903b..f625ea2df 100644 --- a/frontend/src/@types/conversation.d.ts +++ b/frontend/src/@types/conversation.d.ts @@ -11,6 +11,7 @@ export type Model = | 'mistral-7b-instruct' | 'mixtral-8x7b-instruct' | 'mistral-large'; + export type Content = { contentType: 'text' | 'image' | 'attachment'; mediaType?: string; diff --git a/frontend/src/components/SwitchBedrockModel.stories.tsx b/frontend/src/components/SwitchBedrockModel.stories.tsx index daf677651..13395ed3a 100644 --- a/frontend/src/components/SwitchBedrockModel.stories.tsx +++ b/frontend/src/components/SwitchBedrockModel.stories.tsx @@ -1,10 +1,8 @@ import SwitchBedrockModel from './SwitchBedrockModel'; +import { MODEL_KEYS } from '../constants' +import { ModelActivate } from '../@types/bot'; -export const Ideal = () => ; +export const Ideal = () => [key, true]) +) as ModelActivate +}/>; diff --git a/frontend/src/components/SwitchBedrockModel.tsx b/frontend/src/components/SwitchBedrockModel.tsx index 14d60e7f2..3030df7d7 100644 --- a/frontend/src/components/SwitchBedrockModel.tsx +++ b/frontend/src/components/SwitchBedrockModel.tsx @@ -2,7 +2,7 @@ import { BaseProps } from '../@types/common'; import useModel from '../hooks/useModel'; import { Popover, Transition } from '@headlessui/react'; import { Fragment } from 'react/jsx-runtime'; -import { useMemo, useEffect } from 'react'; +import { useMemo } from 'react'; import { PiCaretDown, PiCheck } from 'react-icons/pi'; import { ModelActivate } from '../@types/bot'; @@ -16,8 +16,10 @@ const SwitchBedrockModel: React.FC = (props) => { const availableModels = useMemo(() => { return allModels.filter(model => { - const key = model.modelActivateKey as keyof ModelActivate; - return props.modelActivate[key] === true; + if (props.modelActivate) { + return props.modelActivate[model.modelId] === true; + } + return true; }); }, [allModels, props.modelActivate]); @@ -25,11 +27,6 @@ const SwitchBedrockModel: React.FC = (props) => { return availableModels.find((model) => model.modelId === modelId)?.label ?? ''; }, [availableModels, modelId]); - useEffect(() => { - if (availableModels.length > 0 && !availableModels.some(m => m.modelId === modelId)) { - setModelId(availableModels[0].modelId); - } - }, [availableModels, modelId, setModelId]); return (
diff --git a/frontend/src/constants/index.ts b/frontend/src/constants/index.ts index fcd74f39f..dba0adcf5 100644 --- a/frontend/src/constants/index.ts +++ b/frontend/src/constants/index.ts @@ -1,4 +1,5 @@ import { GenerationParams } from '../@types/bot'; +import { Model } from '../@types/conversation'; export const EDGE_GENERATION_PARAMS = { maxTokens: { @@ -100,3 +101,17 @@ export const GUARDRAILS_CONTECTUAL_GROUNDING_THRESHOLD = { MIN: 0, STEP: 0.01, }; + +export const MODEL_KEYS: Model[] = [ + 'claude-instant-v1', + 'claude-v2', + 'claude-v3-opus', + 'claude-v3-sonnet', + 'claude-v3.5-sonnet', + 'claude-v3.5-sonnet-v2', + 'claude-v3-haiku', + 'claude-v3.5-haiku', + 'mistral-7b-instruct', + 'mixtral-8x7b-instruct', + 'mistral-large' +]; \ No newline at end of file diff --git a/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx b/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx index 7bda7c988..fe777d813 100644 --- a/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx +++ b/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx @@ -46,6 +46,7 @@ import { import { GUARDRAILS_FILTERS_THRESHOLD, GUARDRAILS_CONTECTUAL_GROUNDING_THRESHOLD, + MODEL_KEYS } from '../../../constants'; import { ChunkingStrategy, @@ -58,7 +59,9 @@ import { SearchType, WebCrawlingScope, } from '../types'; - +import { + toCamelCase +} from '../../../utils/StringUtils'; const MISTRAL_ENABLED: boolean = import.meta.env.VITE_APP_ENABLE_MISTRAL === 'true'; @@ -136,19 +139,13 @@ const BotKbEditPage: React.FC = () => { excludePatterns: [''], }); - const [modelActivate, setModelActivate] = useState({ - // Claude models - claude3SonnetV1: true, - claude3HaikuV1: true, - claude3OpusV1: true, - claude35SonnetV1: true, - claude35SonnetV2: true, - claude35HaikuV1: true, - - // Mistral models - mistral7b: true, - mistral8x7b: true, - mistralLarge: true, + const [modelActivate, setModelActivate] = useState(() => { + const initialState = MODEL_KEYS.reduce((acc, key) => { + acc[toCamelCase(key)] = true; + return acc; + }, {} as ModelActivate); + console.log("Initial modelActivate:", initialState); + return initialState; }); const modelActivateOptions: { @@ -159,42 +156,42 @@ const BotKbEditPage: React.FC = () => { ? [ { - key: 'mistral7b', + key: 'mistral-7b-instruct', label: t('model.mistral7b.label') }, { - key: 'mistral8x7b', + key: 'mixtral-8x7b-instruct', label: t('model.mistral8x7b.label') }, { - key: 'mistralLarge', + key: 'mistral-large', label: t('model.mistralLarge.label') } ] : [ { - key: 'claude3SonnetV1', + key: 'claude-v3-sonnet', label: t('model.sonnet3.label') }, { - key: 'claude3HaikuV1', + key: 'claude-v3-haiku', label: t("model.haiku3.label") }, { - key: 'claude3OpusV1', + key: 'claude-v3-opus', label: t("model.opus3.label") }, { - key: 'claude35SonnetV1', + key: 'claude-v3.5-sonnet', label: t('model.sonnet3-5.label') }, { - key: 'claude35SonnetV2', + key: 'claude-v3.5-sonnet-v2', label: t('model.sonnet3-5-v2.label') }, { - key: 'claude35HaikuV1', + key: 'claude-v3.5-haiku', label: t('model.haiku3-5.label') } ] @@ -560,7 +557,7 @@ const BotKbEditPage: React.FC = () => { includePatterns: bot.bedrockKnowledgeBase.webCrawlingFilters?.includePatterns || [''], excludePatterns: bot.bedrockKnowledgeBase.webCrawlingFilters?.excludePatterns || [''], }); - setModelActivate(bot.modelActivate) + setModelActivate(bot.modelActivate); }) .finally(() => { setIsLoading(false); @@ -577,11 +574,10 @@ const BotKbEditPage: React.FC = () => { const onChangeModelActivate = useCallback( (key: string, value: boolean) => { - setModelActivate(prevState => { - const newState = { - ...prevState, - [key]: value - }; + setModelActivate((prevState) => { + const camelKey = toCamelCase(key); + const newState = { ...prevState }; + newState[camelKey] = value; return newState; }); }, @@ -2309,7 +2305,7 @@ const BotKbEditPage: React.FC = () => { {modelActivateOptions.map(({ key, label }) => (
onChangeModelActivate(key, value)} /> {label} diff --git a/frontend/src/hooks/useModel.ts b/frontend/src/hooks/useModel.ts index 668fa436f..799426754 100644 --- a/frontend/src/hooks/useModel.ts +++ b/frontend/src/hooks/useModel.ts @@ -4,6 +4,10 @@ import { useEffect, useMemo, useCallback, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; import useLocalStorage from './useLocalStorage'; import { ModelActivate } from '../@types/bot'; +import { MODEL_KEYS } from '../constants'; +import { + toCamelCase +} from '../utils/StringUtils'; const MISTRAL_ENABLED: boolean = import.meta.env.VITE_APP_ENABLE_MISTRAL === 'true'; @@ -41,6 +45,22 @@ const usePreviousBotId = (botId: string | null | undefined) => { }; const useModel = (botId?: string | null, modelActivate?: ModelActivate) => { + const processedModelActivate = useMemo(() => { + // Early return if modelActivate is provided and not empty + if (modelActivate && Object.keys(modelActivate).length > 0) { + return modelActivate; + } + + // Create a new object with all models set to true + return MODEL_KEYS.reduce((acc, model) => { + // Optimize string replacement by doing it in one operation + acc[toCamelCase(model)] = true; + return acc; + }, {} as ModelActivate); + + }, [modelActivate]); + + const { t } = useTranslation(); const previousBotId = usePreviousBotId(botId); @@ -50,7 +70,6 @@ const useModel = (botId?: string | null, modelActivate?: ModelActivate) => { label: string; supportMediaType: string[]; description?: string; - modelActivateKey: string; }[] >(() => { return !MISTRAL_ENABLED @@ -60,42 +79,36 @@ const useModel = (botId?: string | null, modelActivate?: ModelActivate) => { label: t('model.haiku3.label'), description: t('model.haiku3.description'), supportMediaType: CLAUDE_SUPPORTED_MEDIA_TYPES, - modelActivateKey: 'claude3HaikuV1', }, { modelId: 'claude-v3.5-haiku', label: t('model.haiku3-5.label'), description: t('model.haiku3-5.description'), supportMediaType: CLAUDE_SUPPORTED_MEDIA_TYPES, - modelActivateKey: 'claude35HaikuV1' }, { modelId: 'claude-v3-sonnet', label: t('model.sonnet3.label'), description: t('model.sonnet3.description'), supportMediaType: CLAUDE_SUPPORTED_MEDIA_TYPES, - modelActivateKey: 'claude3SonnetV1' }, { modelId: 'claude-v3.5-sonnet', label: t('model.sonnet3-5.label'), description: t('model.sonnet3-5.description'), supportMediaType: CLAUDE_SUPPORTED_MEDIA_TYPES, - modelActivateKey: 'claude35SonnetV1' }, { modelId: 'claude-v3.5-sonnet-v2', label: t('model.sonnet3-5-v2.label'), description: t('model.sonnet3-5-v2.description'), supportMediaType: CLAUDE_SUPPORTED_MEDIA_TYPES, - modelActivateKey: 'claude35SonnetV2' }, { modelId: 'claude-v3-opus', label: t('model.opus3.label'), description: t('model.opus3.description'), supportMediaType: CLAUDE_SUPPORTED_MEDIA_TYPES, - modelActivateKey: 'claude3OpusV1' }, ] : [ @@ -103,19 +116,16 @@ const useModel = (botId?: string | null, modelActivate?: ModelActivate) => { modelId: 'mistral-7b-instruct', label: t('model.mistral7b.label'), supportMediaType: [], - modelActivateKey: 'mistral7b' }, { modelId: 'mixtral-8x7b-instruct', label: t('model.mistral8x7b.label'), supportMediaType: [], - modelActivateKey: 'mistral8x7b' }, { modelId: 'mistral-large', label: t('model.mistralLarge.label'), supportMediaType: [], - modelActivateKey: 'mistralLarge' }, ]; }, [t]); @@ -137,18 +147,14 @@ const useModel = (botId?: string | null, modelActivate?: ModelActivate) => { useEffect(() => { if (MISTRAL_ENABLED) { setFilteredModels(availableModels) - } else if (modelActivate !== undefined) { + } else if (processedModelActivate) { const filtered = availableModels.filter(model => { - const key = model.modelActivateKey as keyof ModelActivate; - if (modelActivate) { - return modelActivate[key] === true; - } else { - return true; - } + const key = model.modelId as keyof ModelActivate; + return processedModelActivate[key] !== false; }); setFilteredModels(filtered); } - }, [modelActivate, availableModels]); + }, [processedModelActivate, availableModels]); const getDefaultModel = useCallback(() => { // check default model is available @@ -162,12 +168,12 @@ const useModel = (botId?: string | null, modelActivate?: ModelActivate) => { // select the model via list of modelActivate const selectModel = useCallback((targetModelId: Model) => { - const model = filteredModels.find(m => m.modelId === targetModelId); - return model ? targetModelId : getDefaultModel(); + const modelExists = filteredModels.some(m => m.modelId === targetModelId); + return modelExists ? targetModelId : getDefaultModel(); }, [filteredModels, getDefaultModel]); useEffect(() => { - if (modelActivate === undefined) {return} + if (processedModelActivate === undefined) {return} // botId is changed if (previousBotId !== botId) { @@ -201,13 +207,13 @@ const useModel = (botId?: string | null, modelActivate?: ModelActivate) => { }else{ // Processing when botId and previousBotID are the same, but there is an update in FilteredModels if (botId) { - const lastModelAvailable = filteredModels.some(m => m.modelId === recentUseModelId); + const lastModelAvailable = filteredModels.some(m => m.modelId === recentUseModelId || m.modelId === botModelId ); if (!lastModelAvailable) { setModelId(selectModel(getDefaultModel())); } } } - }, [botId, previousBotId, botModelId, recentUseModelId, modelId, filteredModels, setModelId, selectModel, getDefaultModel, modelActivate]); + }, [botId, previousBotId, botModelId, recentUseModelId, modelId, filteredModels, setModelId, selectModel, getDefaultModel, processedModelActivate]); const model = useMemo(() => { return filteredModels.find((model) => model.modelId === modelId); diff --git a/frontend/src/pages/ChatPage.tsx b/frontend/src/pages/ChatPage.tsx index 4e99a7b9d..98fd38920 100644 --- a/frontend/src/pages/ChatPage.tsx +++ b/frontend/src/pages/ChatPage.tsx @@ -48,26 +48,18 @@ import { PutFeedbackRequest, } from '../@types/conversation'; import { convertThinkingLogToAgentToolProps } from '../features/agent/utils/AgentUtils'; +import { + MODEL_KEYS +} from '../constants'; const MISTRAL_ENABLED: boolean = import.meta.env.VITE_APP_ENABLE_MISTRAL === 'true'; // Default model activation settings when no bot is selected const defaultModelActivate: ModelActivate = (() => { - return MISTRAL_ENABLED - ? { - mistral7b: true, - mistral8x7b: true, - mistralLarge: true, - } - : { - claude3SonnetV1: true, - claude3HaikuV1: true, - claude35SonnetV1: true, - claude35SonnetV2: true, - claude35HaikuV1: true, - claude3OpusV1: true, - }; + return Object.fromEntries( + MODEL_KEYS.map(key => [key, true]) + ) as ModelActivate; })(); const ChatPage: React.FC = () => { @@ -381,7 +373,11 @@ const ChatPage: React.FC = () => { }); const modelActivate = useMemo(() => { - return bot?.modelActivate ?? defaultModelActivate; + if (!bot) { + return defaultModelActivate; + } + const isModelActivateEmpty = Object.keys(bot?.modelActivate ?? {}).length === 0; + return isModelActivateEmpty ? defaultModelActivate : bot.modelActivate; }, [bot]); return ( diff --git a/frontend/src/utils/StringUtils.ts b/frontend/src/utils/StringUtils.ts new file mode 100644 index 000000000..536f07afa --- /dev/null +++ b/frontend/src/utils/StringUtils.ts @@ -0,0 +1,14 @@ +export const toCamelCase = (str: string): string => { + return str + .split('-') + .map((part, index) => { + part = part.replace(/\./g, ''); + + if (index === 0) { + return part; + } else { + return part.charAt(0).toUpperCase() + part.slice(1); + } + }) + .join(''); +} \ No newline at end of file From a43f57d5d49b8dc6893a1705072dbec3d40a6ca8 Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Thu, 28 Nov 2024 10:00:57 +0000 Subject: [PATCH 10/34] lint --- backend/app/usecases/bot.py | 4 +++- frontend/src/@types/bot.d.ts | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/app/usecases/bot.py b/backend/app/usecases/bot.py index 43bc7c535..b4d8e0183 100644 --- a/backend/app/usecases/bot.py +++ b/backend/app/usecases/bot.py @@ -530,7 +530,9 @@ def fetch_all_bots_by_user_id( has_knowledge=bot.has_knowledge(), has_agent=bot.is_agent_enabled(), conversation_quick_starters=bot.conversation_quick_starters, - model_activate=ModelActivateModel(**bot.model_activate.model_dump()), + model_activate=ModelActivateModel( + **bot.model_activate.model_dump() + ), ), ) diff --git a/frontend/src/@types/bot.d.ts b/frontend/src/@types/bot.d.ts index 803af3b24..1a0ab0b6b 100644 --- a/frontend/src/@types/bot.d.ts +++ b/frontend/src/@types/bot.d.ts @@ -1,5 +1,4 @@ import { BedrockKnowledgeBase } from '../features/knowledgeBase/types'; -import { Model } from './conversation' export type BotKind = 'private' | 'mixed'; type ModelActivate = { From c90fb2634f995d064aaba2b91e55ffbe919c341f Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Fri, 29 Nov 2024 01:55:07 +0000 Subject: [PATCH 11/34] =?UTF-8?q?=E3=83=A2=E3=83=87=E3=83=AB=E5=90=8D?= =?UTF-8?q?=E3=82=92=E5=8B=95=E7=9A=84=E3=81=AB=E8=A8=AD=E5=AE=9A=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/repositories/custom_bot.py | 10 ++-- backend/app/repositories/models/custom_bot.py | 39 ++++++------- backend/app/routes/bot.py | 2 +- backend/app/routes/schemas/bot.py | 57 ++++++++----------- backend/app/usecases/bot.py | 20 +++---- backend/poetry.lock | 16 +++--- backend/pyproject.toml | 2 +- 7 files changed, 66 insertions(+), 80 deletions(-) diff --git a/backend/app/repositories/custom_bot.py b/backend/app/repositories/custom_bot.py index 1d643e4b9..f0eca7b08 100644 --- a/backend/app/repositories/custom_bot.py +++ b/backend/app/repositories/custom_bot.py @@ -113,7 +113,7 @@ def update_bot( sync_status: type_sync_status, sync_status_reason: str, display_retrieved_chunks: bool, - model_activate: ModelActivateModel, + model_activate: ModelActivateModel, # type: ignore conversation_quick_starters: list[ConversationQuickStarterModel], bedrock_knowledge_base: BedrockKnowledgeBaseModel | None = None, bedrock_guardrails: BedrockGuardrailsModel | None = None, @@ -165,7 +165,7 @@ def update_bot( if model_activate: update_expression += ", ModelActivate = :model_activate" - expression_attribute_values[":model_activate"] = model_activate.model_dump() + expression_attribute_values[":model_activate"] = model_activate.model_dump() # type: ignore[attr-defined] try: response = table.update_item( @@ -496,7 +496,7 @@ def find_private_bot_by_id(user_id: str, bot_id: str) -> BotModel: if "GuardrailsParams" in item else None ), - model_activate=ModelActivateModel.create(item.get("ModelActivate")), + model_activate=ModelActivateModel.model_validate(item.get("ModelActivate")), ) logger.info(f"Found bot: {bot}") @@ -576,7 +576,7 @@ def find_public_bot_by_id(bot_id: str) -> BotModel: if "GuardrailsParams" in item else None ), - model_activate=ModelActivateModel.create(item.get("ModelActivate")), + model_activate=ModelActivateModel.model_validate(item.get("ModelActivate")), ) logger.info(f"Found public bot: {bot}") return bot @@ -606,7 +606,7 @@ def find_alias_by_id(user_id: str, alias_id: str) -> BotAliasModel: has_knowledge=item["HasKnowledge"], has_agent=item.get("HasAgent", False), conversation_quick_starters=item.get("ConversationQuickStarters", []), - model_activate=ModelActivateModel.create(item.get("ModelActivate")), + model_activate=ModelActivateModel.model_validate(item.get("ModelActivate")), ) logger.info(f"Found alias: {bot}") diff --git a/backend/app/repositories/models/custom_bot.py b/backend/app/repositories/models/custom_bot.py index 240e14e89..d0a889890 100644 --- a/backend/app/repositories/models/custom_bot.py +++ b/backend/app/repositories/models/custom_bot.py @@ -1,31 +1,26 @@ -from typing import Optional, get_args, Dict, Any +from typing import get_args, Dict, Any, List, Type from app.repositories.models.common import Float from app.repositories.models.custom_bot_guardrails import BedrockGuardrailsModel from app.repositories.models.custom_bot_kb import BedrockKnowledgeBaseModel from app.routes.schemas.bot import type_sync_status -from pydantic import BaseModel, Field, ConfigDict +from pydantic import BaseModel, ConfigDict, create_model from app.routes.schemas.conversation import type_model_name -class ModelActivateModel(BaseModel): - claude_instant_v1: bool = True - claude_v2: bool = True - claude_v3_sonnet: bool = True - claude_v3_5_sonnet: bool = True - claude_v3_5_sonnet_v2: bool = True - claude_v3_5_haiku: bool = True - claude_v3_haiku: bool = True - claude_v3_opus: bool = True - mistral_7b_instruct: bool = True - mistral_large: bool = True - mixtral_8x7b_instruct: bool = True +class DynamicBaseModel(BaseModel): + model_config = ConfigDict(extra="allow") - @classmethod - def create(cls, data: Dict[str, Any] | None = None) -> "ModelActivateModel": - """Factory method to create an instance with optional data.""" - if data is None: - return cls() - return cls(**data) + +def create_model_activate_model(model_names: List[str]) -> Type[DynamicBaseModel]: + fields: Dict[str, Any] = { + name.replace("-", "_").replace(".", "_"): (bool, False) for name in model_names + } + return create_model("ModelActivateModel", __base__=DynamicBaseModel, **fields) + + +ModelActivateModel: Type[BaseModel] = create_model_activate_model( + list(get_args(type_model_name)) +) class KnowledgeModel(BaseModel): @@ -101,7 +96,7 @@ class BotModel(BaseModel): conversation_quick_starters: list[ConversationQuickStarterModel] bedrock_knowledge_base: BedrockKnowledgeBaseModel | None bedrock_guardrails: BedrockGuardrailsModel | None - model_activate: ModelActivateModel + model_activate: ModelActivateModel # type: ignore def has_knowledge(self) -> bool: return ( @@ -133,7 +128,7 @@ class BotAliasModel(BaseModel): has_knowledge: bool has_agent: bool conversation_quick_starters: list[ConversationQuickStarterModel] - model_activate: ModelActivateModel + model_activate: ModelActivateModel # type: ignore class BotMeta(BaseModel): diff --git a/backend/app/routes/bot.py b/backend/app/routes/bot.py index 5c3446de8..506025920 100644 --- a/backend/app/routes/bot.py +++ b/backend/app/routes/bot.py @@ -154,7 +154,7 @@ def get_private_bot(request: Request, bot_id: str): if bot.bedrock_guardrails else None ), - model_activate=(ModelActivateOutput(**bot.model_activate.model_dump())), + model_activate=ModelActivateOutput(**dict(bot.model_activate)), ) return output diff --git a/backend/app/routes/schemas/bot.py b/backend/app/routes/schemas/bot.py index 28bafbdc4..ee130307f 100644 --- a/backend/app/routes/schemas/bot.py +++ b/backend/app/routes/schemas/bot.py @@ -4,10 +4,16 @@ TYPE_CHECKING, Literal, Optional, + List, + Dict, + Type, + get_args, + Any, ) from pydantic import ( Field, validator, + create_model, ) from app.routes.schemas.base import BaseSchema from app.routes.schemas.bot_guardrails import ( @@ -35,37 +41,24 @@ ] -# Create concrete classes -class ModelActivateInput(BaseSchema): - """Model activation input schema with fields matching type_model_name""" +def create_model_activate_input(model_names: List[str]) -> Type[BaseSchema]: + fields: Dict[str, Any] = { + name.replace("-", "_").replace(".", "_"): (bool, True) for name in model_names + } + return create_model("ModelActivateInput", **fields, __base__=BaseSchema) - claude_instant_v1: bool = True - claude_v2: bool = True - claude_v3_sonnet: bool = True - claude_v3_5_sonnet: bool = True - claude_v3_5_sonnet_v2: bool = True - claude_v3_5_haiku: bool = True - claude_v3_haiku: bool = True - claude_v3_opus: bool = True - mistral_7b_instruct: bool = True - mistral_large: bool = True - mixtral_8x7b_instruct: bool = True +ModelActivateInput = create_model_activate_input(list(get_args(type_model_name))) -class ModelActivateOutput(BaseSchema): - """Model activation output schema with fields matching type_model_name""" - claude_instant_v1: bool = True - claude_v2: bool = True - claude_v3_sonnet: bool = True - claude_v3_5_sonnet: bool = True - claude_v3_5_sonnet_v2: bool = True - claude_v3_5_haiku: bool = True - claude_v3_haiku: bool = True - claude_v3_opus: bool = True - mistral_7b_instruct: bool = True - mistral_large: bool = True - mixtral_8x7b_instruct: bool = True +def create_model_activate_output(model_names: List[str]) -> Type[BaseSchema]: + fields: Dict[str, Any] = { + name.replace("-", "_").replace(".", "_"): (bool, True) for name in model_names + } + return create_model("ModelActivateOutput", **fields, __base__=BaseSchema) + + +ModelActivateOutput = create_model_activate_output(list(get_args(type_model_name))) class GenerationParams(BaseSchema): @@ -142,7 +135,7 @@ class BotInput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] | None bedrock_knowledge_base: BedrockKnowledgeBaseInput | None = None bedrock_guardrails: BedrockGuardrailsInput | None = None - model_activate: ModelActivateInput + model_activate: ModelActivateInput # type: ignore class BotModifyInput(BaseSchema): @@ -156,7 +149,7 @@ class BotModifyInput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] | None bedrock_knowledge_base: BedrockKnowledgeBaseInput | None = None bedrock_guardrails: BedrockGuardrailsInput | None = None - model_activate: ModelActivateInput + model_activate: ModelActivateInput # type: ignore def _has_update_files(self) -> bool: return self.knowledge is not None and ( @@ -270,7 +263,7 @@ class BotModifyOutput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] bedrock_knowledge_base: BedrockKnowledgeBaseOutput | None bedrock_guardrails: BedrockGuardrailsOutput | None - model_activate: ModelActivateOutput + model_activate: ModelActivateOutput # type: ignore class BotOutput(BaseSchema): @@ -294,7 +287,7 @@ class BotOutput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] bedrock_knowledge_base: BedrockKnowledgeBaseOutput | None bedrock_guardrails: BedrockGuardrailsOutput | None - model_activate: ModelActivateOutput + model_activate: ModelActivateOutput # type: ignore class BotMetaOutput(BaseSchema): @@ -325,7 +318,7 @@ class BotSummaryOutput(BaseSchema): sync_status: type_sync_status has_knowledge: bool conversation_quick_starters: list[ConversationQuickStarter] - model_activate: ModelActivateOutput + model_activate: ModelActivateOutput # type: ignore class BotSwitchVisibilityInput(BaseSchema): diff --git a/backend/app/usecases/bot.py b/backend/app/usecases/bot.py index b4d8e0183..909786cf9 100644 --- a/backend/app/usecases/bot.py +++ b/backend/app/usecases/bot.py @@ -206,7 +206,7 @@ def create_new_bot(user_id: str, bot_input: BotInput) -> BotOutput: if bot_input.bedrock_guardrails else None ), - model_activate=ModelActivateModel(**bot_input.model_activate.model_dump()), + model_activate=ModelActivateModel(**dict(bot_input.model_activate)), ), ) return BotOutput( @@ -259,7 +259,7 @@ def create_new_bot(user_id: str, bot_input: BotInput) -> BotOutput: if bot_input.bedrock_guardrails else None ), - model_activate=ModelActivateOutput(**bot_input.model_activate.model_dump()), + model_activate=ModelActivateOutput(**dict(bot_input.model_activate)), ) @@ -366,7 +366,7 @@ def modify_owned_bot( if modify_input.bedrock_guardrails else None ), - model_activate=ModelActivateModel(**modify_input.model_activate.model_dump()), + model_activate=ModelActivateOutput(**dict(modify_input.model_activate)), ) return BotModifyOutput( @@ -410,7 +410,7 @@ def modify_owned_bot( if modify_input.bedrock_guardrails else None ), - model_activate=ModelActivateOutput(**modify_input.model_activate.model_dump()), + model_activate=ModelActivateOutput(**dict(modify_input.model_activate)), ) @@ -530,9 +530,7 @@ def fetch_all_bots_by_user_id( has_knowledge=bot.has_knowledge(), has_agent=bot.is_agent_enabled(), conversation_quick_starters=bot.conversation_quick_starters, - model_activate=ModelActivateModel( - **bot.model_activate.model_dump() - ), + model_activate=ModelActivateModel(**dict(bot.model_activate)), ), ) @@ -629,7 +627,7 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: ) for starter in bot.conversation_quick_starters ], - model_activate=ModelActivateOutput(**bot.model_activate.model_dump()), + model_activate=ModelActivateOutput(**dict(bot.model_activate)), ) except RecordNotFoundError: @@ -664,7 +662,7 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: for starter in alias.conversation_quick_starters ] ), - model_activate=ModelActivateOutput(**alias.model_activate.model_dump()), + model_activate=ModelActivateOutput(**dict(alias.model_activate)), ) except RecordNotFoundError: pass @@ -694,7 +692,7 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: ) for starter in bot.conversation_quick_starters ], - model_activate=ModelActivateModel(**bot.model_activate.model_dump()), + model_activate=ModelActivateOutput(**dict(bot.model_activate)), ), ) return BotSummaryOutput( @@ -716,7 +714,7 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: ) for starter in bot.conversation_quick_starters ], - model_activate=ModelActivateOutput(**bot.model_activate.model_dump()), + model_activate=ModelActivateOutput(**dict(bot.model_activate)), ) except RecordNotFoundError: raise RecordNotFoundError( diff --git a/backend/poetry.lock b/backend/poetry.lock index 4dd4228b8..0851d0849 100644 --- a/backend/poetry.lock +++ b/backend/poetry.lock @@ -99,17 +99,17 @@ uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "boto3" -version = "1.35.70" +version = "1.35.71" description = "The AWS SDK for Python" optional = false python-versions = ">=3.8" files = [ - {file = "boto3-1.35.70-py3-none-any.whl", hash = "sha256:ca385708f83f01b3f27d9d675880d2458cb3b40ed1e25da688f551454ed0c112"}, - {file = "boto3-1.35.70.tar.gz", hash = "sha256:121dce8c7102eea6a6047d46bcd74e8a24dac793a4a3857de4f4bad9c12566fd"}, + {file = "boto3-1.35.71-py3-none-any.whl", hash = "sha256:e2969a246bb3208122b3c349c49cc6604c6fc3fc2b2f65d99d3e8ccd745b0c16"}, + {file = "boto3-1.35.71.tar.gz", hash = "sha256:3ed7172b3d4fceb6218bb0ec3668c4d40c03690939c2fca4f22bb875d741a07f"}, ] [package.dependencies] -botocore = ">=1.35.70,<1.36.0" +botocore = ">=1.35.71,<1.36.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.10.0,<0.11.0" @@ -118,13 +118,13 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.35.70" +version = "1.35.71" description = "Low-level, data-driven core of boto 3." optional = false python-versions = ">=3.8" files = [ - {file = "botocore-1.35.70-py3-none-any.whl", hash = "sha256:ba8a4797cf7c5d9c237e67a62692f5146e895613fd3e6a43b00b66f3a8c7fc73"}, - {file = "botocore-1.35.70.tar.gz", hash = "sha256:18d1bb505722d9efd50c50719ed8de7284bfe6d3908a9e08756a7646e549da21"}, + {file = "botocore-1.35.71-py3-none-any.whl", hash = "sha256:fc46e7ab1df3cef66dfba1633f4da77c75e07365b36f03bd64a3793634be8fc1"}, + {file = "botocore-1.35.71.tar.gz", hash = "sha256:f9fa058e0393660c3fe53c1e044751beb64b586def0bd2212448a7c328b0cbba"}, ] [package.dependencies] @@ -960,4 +960,4 @@ standard = ["colorama (>=0.4)", "httptools (>=0.6.3)", "python-dotenv (>=0.13)", [metadata] lock-version = "2.0" python-versions = ">=3.11,<3.13" -content-hash = "c3a4705bee027f05c7df8b2b4030f2e18d259b583f3400a591466d182fe25e70" +content-hash = "bae76d783781663dc3be25d073efb169a937b7af7224b3a54b08fb4bad88d10a" diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 5f5e3b584..b89b0d0d0 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -6,7 +6,7 @@ python = ">=3.11,<3.13" fastapi = ">=0.109.1,<1" requests = "^2.32.0" types-requests = "^2.31.0" -pydantic = "^2.4.0" +pydantic = "^2.10.2" pyhumps = "^3.8.0" uvicorn = ">=0.23.1,<1" python-ulid = "^1.1.0" From f12085b32b4152bdecda43f85495c609ab701e32 Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Fri, 29 Nov 2024 02:28:07 +0000 Subject: [PATCH 12/34] lint --- backend/app/repositories/custom_bot.py | 4 ++-- backend/app/repositories/models/custom_bot.py | 4 ++-- backend/app/routes/schemas/bot.py | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/backend/app/repositories/custom_bot.py b/backend/app/repositories/custom_bot.py index f0eca7b08..0661493d2 100644 --- a/backend/app/repositories/custom_bot.py +++ b/backend/app/repositories/custom_bot.py @@ -113,7 +113,7 @@ def update_bot( sync_status: type_sync_status, sync_status_reason: str, display_retrieved_chunks: bool, - model_activate: ModelActivateModel, # type: ignore + model_activate: ModelActivateModel, # type: ignore conversation_quick_starters: list[ConversationQuickStarterModel], bedrock_knowledge_base: BedrockKnowledgeBaseModel | None = None, bedrock_guardrails: BedrockGuardrailsModel | None = None, @@ -165,7 +165,7 @@ def update_bot( if model_activate: update_expression += ", ModelActivate = :model_activate" - expression_attribute_values[":model_activate"] = model_activate.model_dump() # type: ignore[attr-defined] + expression_attribute_values[":model_activate"] = model_activate.model_dump() # type: ignore[attr-defined] try: response = table.update_item( diff --git a/backend/app/repositories/models/custom_bot.py b/backend/app/repositories/models/custom_bot.py index d0a889890..49262556d 100644 --- a/backend/app/repositories/models/custom_bot.py +++ b/backend/app/repositories/models/custom_bot.py @@ -96,7 +96,7 @@ class BotModel(BaseModel): conversation_quick_starters: list[ConversationQuickStarterModel] bedrock_knowledge_base: BedrockKnowledgeBaseModel | None bedrock_guardrails: BedrockGuardrailsModel | None - model_activate: ModelActivateModel # type: ignore + model_activate: ModelActivateModel # type: ignore def has_knowledge(self) -> bool: return ( @@ -128,7 +128,7 @@ class BotAliasModel(BaseModel): has_knowledge: bool has_agent: bool conversation_quick_starters: list[ConversationQuickStarterModel] - model_activate: ModelActivateModel # type: ignore + model_activate: ModelActivateModel # type: ignore class BotMeta(BaseModel): diff --git a/backend/app/routes/schemas/bot.py b/backend/app/routes/schemas/bot.py index ee130307f..7db414bc2 100644 --- a/backend/app/routes/schemas/bot.py +++ b/backend/app/routes/schemas/bot.py @@ -135,7 +135,7 @@ class BotInput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] | None bedrock_knowledge_base: BedrockKnowledgeBaseInput | None = None bedrock_guardrails: BedrockGuardrailsInput | None = None - model_activate: ModelActivateInput # type: ignore + model_activate: ModelActivateInput # type: ignore class BotModifyInput(BaseSchema): @@ -149,7 +149,7 @@ class BotModifyInput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] | None bedrock_knowledge_base: BedrockKnowledgeBaseInput | None = None bedrock_guardrails: BedrockGuardrailsInput | None = None - model_activate: ModelActivateInput # type: ignore + model_activate: ModelActivateInput # type: ignore def _has_update_files(self) -> bool: return self.knowledge is not None and ( @@ -263,7 +263,7 @@ class BotModifyOutput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] bedrock_knowledge_base: BedrockKnowledgeBaseOutput | None bedrock_guardrails: BedrockGuardrailsOutput | None - model_activate: ModelActivateOutput # type: ignore + model_activate: ModelActivateOutput # type: ignore class BotOutput(BaseSchema): @@ -287,7 +287,7 @@ class BotOutput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] bedrock_knowledge_base: BedrockKnowledgeBaseOutput | None bedrock_guardrails: BedrockGuardrailsOutput | None - model_activate: ModelActivateOutput # type: ignore + model_activate: ModelActivateOutput # type: ignore class BotMetaOutput(BaseSchema): @@ -318,7 +318,7 @@ class BotSummaryOutput(BaseSchema): sync_status: type_sync_status has_knowledge: bool conversation_quick_starters: list[ConversationQuickStarter] - model_activate: ModelActivateOutput # type: ignore + model_activate: ModelActivateOutput # type: ignore class BotSwitchVisibilityInput(BaseSchema): From 99397f8facb8c27d40472a0af277704c2df1e89e Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Fri, 29 Nov 2024 11:31:36 +0000 Subject: [PATCH 13/34] poetry update --- backend/poetry.lock | 911 +------------------------------------------- 1 file changed, 1 insertion(+), 910 deletions(-) diff --git a/backend/poetry.lock b/backend/poetry.lock index fc8b6bc04..a71f21b9c 100644 --- a/backend/poetry.lock +++ b/backend/poetry.lock @@ -576,50 +576,6 @@ types-awscrt = "*" [package.extras] botocore = ["botocore"] -[[package]] -name = "build" -version = "1.2.2.post1" -description = "A simple, correct Python build frontend" -optional = false -python-versions = ">=3.8" -files = [ - {file = "build-1.2.2.post1-py3-none-any.whl", hash = "sha256:1d61c0887fa860c01971625baae8bdd338e517b836a2f70dd1f7aa3a6b2fc5b5"}, - {file = "build-1.2.2.post1.tar.gz", hash = "sha256:b36993e92ca9375a219c99e606a122ff365a760a2d4bba0caa09bd5278b608b7"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "os_name == \"nt\""} -packaging = ">=19.1" -pyproject_hooks = "*" - -[package.extras] -docs = ["furo (>=2023.08.17)", "sphinx (>=7.0,<8.0)", "sphinx-argparse-cli (>=1.5)", "sphinx-autodoc-typehints (>=1.10)", "sphinx-issues (>=3.0.0)"] -test = ["build[uv,virtualenv]", "filelock (>=3)", "pytest (>=6.2.4)", "pytest-cov (>=2.12)", "pytest-mock (>=2)", "pytest-rerunfailures (>=9.1)", "pytest-xdist (>=1.34)", "setuptools (>=42.0.0)", "setuptools (>=56.0.0)", "setuptools (>=56.0.0)", "setuptools (>=67.8.0)", "wheel (>=0.36.0)"] -typing = ["build[uv]", "importlib-metadata (>=5.1)", "mypy (>=1.9.0,<1.10.0)", "tomli", "typing-extensions (>=3.7.4.3)"] -uv = ["uv (>=0.1.18)"] -virtualenv = ["virtualenv (>=20.0.35)"] - -[[package]] -name = "cachecontrol" -version = "0.14.1" -description = "httplib2 caching for requests" -optional = false -python-versions = ">=3.8" -files = [ - {file = "cachecontrol-0.14.1-py3-none-any.whl", hash = "sha256:65e3abd62b06382ce3894df60dde9e0deb92aeb734724f68fa4f3b91e97206b9"}, - {file = "cachecontrol-0.14.1.tar.gz", hash = "sha256:06ef916a1e4eb7dba9948cdfc9c76e749db2e02104a9a1277e8b642591a0f717"}, -] - -[package.dependencies] -filelock = {version = ">=3.8.0", optional = true, markers = "extra == \"filecache\""} -msgpack = ">=0.5.2,<2.0.0" -requests = ">=2.16.0" - -[package.extras] -dev = ["CacheControl[filecache,redis]", "build", "cherrypy", "codespell[tomli]", "furo", "mypy", "pytest", "pytest-cov", "ruff", "sphinx", "sphinx-copybutton", "tox", "types-redis", "types-requests"] -filecache = ["filelock (>=3.8.0)"] -redis = ["redis (>=2.10.5)"] - [[package]] name = "certifi" version = "2024.8.30" @@ -631,85 +587,6 @@ files = [ {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, ] -[[package]] -name = "cffi" -version = "1.17.1" -description = "Foreign Function Interface for Python calling C code." -optional = false -python-versions = ">=3.8" -files = [ - {file = "cffi-1.17.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14"}, - {file = "cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67"}, - {file = "cffi-1.17.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:edae79245293e15384b51f88b00613ba9f7198016a5948b5dddf4917d4d26382"}, - {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45398b671ac6d70e67da8e4224a065cec6a93541bb7aebe1b198a61b58c7b702"}, - {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ad9413ccdeda48c5afdae7e4fa2192157e991ff761e7ab8fdd8926f40b160cc3"}, - {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5da5719280082ac6bd9aa7becb3938dc9f9cbd57fac7d2871717b1feb0902ab6"}, - {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bb1a08b8008b281856e5971307cc386a8e9c5b625ac297e853d36da6efe9c17"}, - {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:045d61c734659cc045141be4bae381a41d89b741f795af1dd018bfb532fd0df8"}, - {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6883e737d7d9e4899a8a695e00ec36bd4e5e4f18fabe0aca0efe0a4b44cdb13e"}, - {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:6b8b4a92e1c65048ff98cfe1f735ef8f1ceb72e3d5f0c25fdb12087a23da22be"}, - {file = "cffi-1.17.1-cp310-cp310-win32.whl", hash = "sha256:c9c3d058ebabb74db66e431095118094d06abf53284d9c81f27300d0e0d8bc7c"}, - {file = "cffi-1.17.1-cp310-cp310-win_amd64.whl", hash = "sha256:0f048dcf80db46f0098ccac01132761580d28e28bc0f78ae0d58048063317e15"}, - {file = "cffi-1.17.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a45e3c6913c5b87b3ff120dcdc03f6131fa0065027d0ed7ee6190736a74cd401"}, - {file = "cffi-1.17.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:30c5e0cb5ae493c04c8b42916e52ca38079f1b235c2f8ae5f4527b963c401caf"}, - {file = "cffi-1.17.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f75c7ab1f9e4aca5414ed4d8e5c0e303a34f4421f8a0d47a4d019ceff0ab6af4"}, - {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1ed2dd2972641495a3ec98445e09766f077aee98a1c896dcb4ad0d303628e41"}, - {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:46bf43160c1a35f7ec506d254e5c890f3c03648a4dbac12d624e4490a7046cd1"}, - {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a24ed04c8ffd54b0729c07cee15a81d964e6fee0e3d4d342a27b020d22959dc6"}, - {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:610faea79c43e44c71e1ec53a554553fa22321b65fae24889706c0a84d4ad86d"}, - {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a9b15d491f3ad5d692e11f6b71f7857e7835eb677955c00cc0aefcd0669adaf6"}, - {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:de2ea4b5833625383e464549fec1bc395c1bdeeb5f25c4a3a82b5a8c756ec22f"}, - {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b"}, - {file = "cffi-1.17.1-cp311-cp311-win32.whl", hash = "sha256:85a950a4ac9c359340d5963966e3e0a94a676bd6245a4b55bc43949eee26a655"}, - {file = "cffi-1.17.1-cp311-cp311-win_amd64.whl", hash = "sha256:caaf0640ef5f5517f49bc275eca1406b0ffa6aa184892812030f04c2abf589a0"}, - {file = "cffi-1.17.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:805b4371bf7197c329fcb3ead37e710d1bca9da5d583f5073b799d5c5bd1eee4"}, - {file = "cffi-1.17.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:733e99bc2df47476e3848417c5a4540522f234dfd4ef3ab7fafdf555b082ec0c"}, - {file = "cffi-1.17.1-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1257bdabf294dceb59f5e70c64a3e2f462c30c7ad68092d01bbbfb1c16b1ba36"}, - {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da95af8214998d77a98cc14e3a3bd00aa191526343078b530ceb0bd710fb48a5"}, - {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d63afe322132c194cf832bfec0dc69a99fb9bb6bbd550f161a49e9e855cc78ff"}, - {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f79fc4fc25f1c8698ff97788206bb3c2598949bfe0fef03d299eb1b5356ada99"}, - {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b62ce867176a75d03a665bad002af8e6d54644fad99a3c70905c543130e39d93"}, - {file = "cffi-1.17.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:386c8bf53c502fff58903061338ce4f4950cbdcb23e2902d86c0f722b786bbe3"}, - {file = "cffi-1.17.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4ceb10419a9adf4460ea14cfd6bc43d08701f0835e979bf821052f1805850fe8"}, - {file = "cffi-1.17.1-cp312-cp312-win32.whl", hash = "sha256:a08d7e755f8ed21095a310a693525137cfe756ce62d066e53f502a83dc550f65"}, - {file = "cffi-1.17.1-cp312-cp312-win_amd64.whl", hash = "sha256:51392eae71afec0d0c8fb1a53b204dbb3bcabcb3c9b807eedf3e1e6ccf2de903"}, - {file = "cffi-1.17.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f3a2b4222ce6b60e2e8b337bb9596923045681d71e5a082783484d845390938e"}, - {file = "cffi-1.17.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2"}, - {file = "cffi-1.17.1-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d01b12eeeb4427d3110de311e1774046ad344f5b1a7403101878976ecd7a10f3"}, - {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:706510fe141c86a69c8ddc029c7910003a17353970cff3b904ff0686a5927683"}, - {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de55b766c7aa2e2a3092c51e0483d700341182f08e67c63630d5b6f200bb28e5"}, - {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c59d6e989d07460165cc5ad3c61f9fd8f1b4796eacbd81cee78957842b834af4"}, - {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd398dbc6773384a17fe0d3e7eeb8d1a21c2200473ee6806bb5e6a8e62bb73dd"}, - {file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed"}, - {file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9"}, - {file = "cffi-1.17.1-cp313-cp313-win32.whl", hash = "sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d"}, - {file = "cffi-1.17.1-cp313-cp313-win_amd64.whl", hash = "sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a"}, - {file = "cffi-1.17.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:636062ea65bd0195bc012fea9321aca499c0504409f413dc88af450b57ffd03b"}, - {file = "cffi-1.17.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c7eac2ef9b63c79431bc4b25f1cd649d7f061a28808cbc6c47b534bd789ef964"}, - {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e221cf152cff04059d011ee126477f0d9588303eb57e88923578ace7baad17f9"}, - {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:31000ec67d4221a71bd3f67df918b1f88f676f1c3b535a7eb473255fdc0b83fc"}, - {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f17be4345073b0a7b8ea599688f692ac3ef23ce28e5df79c04de519dbc4912c"}, - {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2b1fac190ae3ebfe37b979cc1ce69c81f4e4fe5746bb401dca63a9062cdaf1"}, - {file = "cffi-1.17.1-cp38-cp38-win32.whl", hash = "sha256:7596d6620d3fa590f677e9ee430df2958d2d6d6de2feeae5b20e82c00b76fbf8"}, - {file = "cffi-1.17.1-cp38-cp38-win_amd64.whl", hash = "sha256:78122be759c3f8a014ce010908ae03364d00a1f81ab5c7f4a7a5120607ea56e1"}, - {file = "cffi-1.17.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b2ab587605f4ba0bf81dc0cb08a41bd1c0a5906bd59243d56bad7668a6fc6c16"}, - {file = "cffi-1.17.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:28b16024becceed8c6dfbc75629e27788d8a3f9030691a1dbf9821a128b22c36"}, - {file = "cffi-1.17.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1d599671f396c4723d016dbddb72fe8e0397082b0a77a4fab8028923bec050e8"}, - {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca74b8dbe6e8e8263c0ffd60277de77dcee6c837a3d0881d8c1ead7268c9e576"}, - {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87"}, - {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98e3969bcff97cae1b2def8ba499ea3d6f31ddfdb7635374834cf89a1a08ecf0"}, - {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cdf5ce3acdfd1661132f2a9c19cac174758dc2352bfe37d98aa7512c6b7178b3"}, - {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9755e4345d1ec879e3849e62222a18c7174d65a6a92d5b346b1863912168b595"}, - {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f1e22e8c4419538cb197e4dd60acc919d7696e5ef98ee4da4e01d3f8cfa4cc5a"}, - {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c03e868a0b3bc35839ba98e74211ed2b05d2119be4e8a0f224fba9384f1fe02e"}, - {file = "cffi-1.17.1-cp39-cp39-win32.whl", hash = "sha256:e31ae45bc2e29f6b2abd0de1cc3b9d5205aa847cafaecb8af1476a609a2f6eb7"}, - {file = "cffi-1.17.1-cp39-cp39-win_amd64.whl", hash = "sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662"}, - {file = "cffi-1.17.1.tar.gz", hash = "sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"}, -] - -[package.dependencies] -pycparser = "*" - [[package]] name = "charset-normalizer" version = "3.4.0" @@ -824,21 +701,6 @@ files = [ {file = "charset_normalizer-3.4.0.tar.gz", hash = "sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e"}, ] -[[package]] -name = "cleo" -version = "2.1.0" -description = "Cleo allows you to create beautiful and testable command-line interfaces." -optional = false -python-versions = ">=3.7,<4.0" -files = [ - {file = "cleo-2.1.0-py3-none-any.whl", hash = "sha256:4a31bd4dd45695a64ee3c4758f583f134267c2bc518d8ae9a29cf237d009b07e"}, - {file = "cleo-2.1.0.tar.gz", hash = "sha256:0b2c880b5d13660a7ea651001fb4acb527696c01f15c9ee650f377aa543fd523"}, -] - -[package.dependencies] -crashtest = ">=0.4.1,<0.5.0" -rapidfuzz = ">=3.0.0,<4.0.0" - [[package]] name = "click" version = "8.1.7" @@ -864,68 +726,6 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] -[[package]] -name = "crashtest" -version = "0.4.1" -description = "Manage Python errors with ease" -optional = false -python-versions = ">=3.7,<4.0" -files = [ - {file = "crashtest-0.4.1-py3-none-any.whl", hash = "sha256:8d23eac5fa660409f57472e3851dab7ac18aba459a8d19cbbba86d3d5aecd2a5"}, - {file = "crashtest-0.4.1.tar.gz", hash = "sha256:80d7b1f316ebfbd429f648076d6275c877ba30ba48979de4191714a75266f0ce"}, -] - -[[package]] -name = "cryptography" -version = "44.0.0" -description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." -optional = false -python-versions = "!=3.9.0,!=3.9.1,>=3.7" -files = [ - {file = "cryptography-44.0.0-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:84111ad4ff3f6253820e6d3e58be2cc2a00adb29335d4cacb5ab4d4d34f2a123"}, - {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b15492a11f9e1b62ba9d73c210e2416724633167de94607ec6069ef724fad092"}, - {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:831c3c4d0774e488fdc83a1923b49b9957d33287de923d58ebd3cec47a0ae43f"}, - {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:761817a3377ef15ac23cd7834715081791d4ec77f9297ee694ca1ee9c2c7e5eb"}, - {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:3c672a53c0fb4725a29c303be906d3c1fa99c32f58abe008a82705f9ee96f40b"}, - {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:4ac4c9f37eba52cb6fbeaf5b59c152ea976726b865bd4cf87883a7e7006cc543"}, - {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:60eb32934076fa07e4316b7b2742fa52cbb190b42c2df2863dbc4230a0a9b385"}, - {file = "cryptography-44.0.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ed3534eb1090483c96178fcb0f8893719d96d5274dfde98aa6add34614e97c8e"}, - {file = "cryptography-44.0.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:f3f6fdfa89ee2d9d496e2c087cebef9d4fcbb0ad63c40e821b39f74bf48d9c5e"}, - {file = "cryptography-44.0.0-cp37-abi3-win32.whl", hash = "sha256:eb33480f1bad5b78233b0ad3e1b0be21e8ef1da745d8d2aecbb20671658b9053"}, - {file = "cryptography-44.0.0-cp37-abi3-win_amd64.whl", hash = "sha256:abc998e0c0eee3c8a1904221d3f67dcfa76422b23620173e28c11d3e626c21bd"}, - {file = "cryptography-44.0.0-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:660cb7312a08bc38be15b696462fa7cc7cd85c3ed9c576e81f4dc4d8b2b31591"}, - {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1923cb251c04be85eec9fda837661c67c1049063305d6be5721643c22dd4e2b7"}, - {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:404fdc66ee5f83a1388be54300ae978b2efd538018de18556dde92575e05defc"}, - {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:c5eb858beed7835e5ad1faba59e865109f3e52b3783b9ac21e7e47dc5554e289"}, - {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:f53c2c87e0fb4b0c00fa9571082a057e37690a8f12233306161c8f4b819960b7"}, - {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:9e6fc8a08e116fb7c7dd1f040074c9d7b51d74a8ea40d4df2fc7aa08b76b9e6c"}, - {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:9abcc2e083cbe8dde89124a47e5e53ec38751f0d7dfd36801008f316a127d7ba"}, - {file = "cryptography-44.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:d2436114e46b36d00f8b72ff57e598978b37399d2786fd39793c36c6d5cb1c64"}, - {file = "cryptography-44.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a01956ddfa0a6790d594f5b34fc1bfa6098aca434696a03cfdbe469b8ed79285"}, - {file = "cryptography-44.0.0-cp39-abi3-win32.whl", hash = "sha256:eca27345e1214d1b9f9490d200f9db5a874479be914199194e746c893788d417"}, - {file = "cryptography-44.0.0-cp39-abi3-win_amd64.whl", hash = "sha256:708ee5f1bafe76d041b53a4f95eb28cdeb8d18da17e597d46d7833ee59b97ede"}, - {file = "cryptography-44.0.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:37d76e6863da3774cd9db5b409a9ecfd2c71c981c38788d3fcfaf177f447b731"}, - {file = "cryptography-44.0.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:f677e1268c4e23420c3acade68fac427fffcb8d19d7df95ed7ad17cdef8404f4"}, - {file = "cryptography-44.0.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:f5e7cb1e5e56ca0933b4873c0220a78b773b24d40d186b6738080b73d3d0a756"}, - {file = "cryptography-44.0.0-pp310-pypy310_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:8b3e6eae66cf54701ee7d9c83c30ac0a1e3fa17be486033000f2a73a12ab507c"}, - {file = "cryptography-44.0.0-pp310-pypy310_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:be4ce505894d15d5c5037167ffb7f0ae90b7be6f2a98f9a5c3442395501c32fa"}, - {file = "cryptography-44.0.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:62901fb618f74d7d81bf408c8719e9ec14d863086efe4185afd07c352aee1d2c"}, - {file = "cryptography-44.0.0.tar.gz", hash = "sha256:cd4e834f340b4293430701e772ec543b0fbe6c2dea510a5286fe0acabe153a02"}, -] - -[package.dependencies] -cffi = {version = ">=1.12", markers = "platform_python_implementation != \"PyPy\""} - -[package.extras] -docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=3.0.0)"] -docstest = ["pyenchant (>=3)", "readme-renderer (>=30.0)", "sphinxcontrib-spelling (>=7.3.1)"] -nox = ["nox (>=2024.4.15)", "nox[uv] (>=2024.3.2)"] -pep8test = ["check-sdist", "click (>=8.0.1)", "mypy (>=1.4)", "ruff (>=0.3.6)"] -sdist = ["build (>=1.0.0)"] -ssh = ["bcrypt (>=3.1.5)"] -test = ["certifi (>=2024)", "cryptography-vectors (==44.0.0)", "pretend (>=0.7)", "pytest (>=7.4.0)", "pytest-benchmark (>=4.0)", "pytest-cov (>=2.10.1)", "pytest-xdist (>=3.5.0)"] -test-randomorder = ["pytest-randomly"] - [[package]] name = "decorator" version = "5.1.1" @@ -937,17 +737,6 @@ files = [ {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, ] -[[package]] -name = "distlib" -version = "0.3.9" -description = "Distribution utilities" -optional = false -python-versions = "*" -files = [ - {file = "distlib-0.3.9-py2.py3-none-any.whl", hash = "sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87"}, - {file = "distlib-0.3.9.tar.gz", hash = "sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403"}, -] - [[package]] name = "duckduckgo-search" version = "6.3.7" @@ -967,93 +756,6 @@ primp = ">=0.8.1" dev = ["mypy (>=1.11.1)", "pytest (>=8.3.1)", "pytest-asyncio (>=0.23.8)", "ruff (>=0.6.1)"] lxml = ["lxml (>=5.2.2)"] -[[package]] -name = "dulwich" -version = "0.21.7" -description = "Python Git Library" -optional = false -python-versions = ">=3.7" -files = [ - {file = "dulwich-0.21.7-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d4c0110798099bb7d36a110090f2688050703065448895c4f53ade808d889dd3"}, - {file = "dulwich-0.21.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2bc12697f0918bee324c18836053644035362bb3983dc1b210318f2fed1d7132"}, - {file = "dulwich-0.21.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:471305af74790827fcbafe330fc2e8bdcee4fb56ca1177c8c481b1c8f806c4a4"}, - {file = "dulwich-0.21.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d54c9d0e845be26f65f954dff13a1cd3f2b9739820c19064257b8fd7435ab263"}, - {file = "dulwich-0.21.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:12d61334a575474e707614f2e93d6ed4cdae9eb47214f9277076d9e5615171d3"}, - {file = "dulwich-0.21.7-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e274cebaf345f0b1e3b70197f2651de92b652386b68020cfd3bf61bc30f6eaaa"}, - {file = "dulwich-0.21.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:817822f970e196e757ae01281ecbf21369383285b9f4a83496312204cf889b8c"}, - {file = "dulwich-0.21.7-cp310-cp310-win32.whl", hash = "sha256:7836da3f4110ce684dcd53489015fb7fa94ed33c5276e3318b8b1cbcb5b71e08"}, - {file = "dulwich-0.21.7-cp310-cp310-win_amd64.whl", hash = "sha256:4a043b90958cec866b4edc6aef5fe3c2c96a664d0b357e1682a46f6c477273c4"}, - {file = "dulwich-0.21.7-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ce8db196e79c1f381469410d26fb1d8b89c6b87a4e7f00ff418c22a35121405c"}, - {file = "dulwich-0.21.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:62bfb26bdce869cd40be443dfd93143caea7089b165d2dcc33de40f6ac9d812a"}, - {file = "dulwich-0.21.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c01a735b9a171dcb634a97a3cec1b174cfbfa8e840156870384b633da0460f18"}, - {file = "dulwich-0.21.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fa4d14767cf7a49c9231c2e52cb2a3e90d0c83f843eb6a2ca2b5d81d254cf6b9"}, - {file = "dulwich-0.21.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bca4b86e96d6ef18c5bc39828ea349efb5be2f9b1f6ac9863f90589bac1084d"}, - {file = "dulwich-0.21.7-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a7b5624b02ef808cdc62dabd47eb10cd4ac15e8ac6df9e2e88b6ac6b40133673"}, - {file = "dulwich-0.21.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c3a539b4696a42fbdb7412cb7b66a4d4d332761299d3613d90a642923c7560e1"}, - {file = "dulwich-0.21.7-cp311-cp311-win32.whl", hash = "sha256:675a612ce913081beb0f37b286891e795d905691dfccfb9bf73721dca6757cde"}, - {file = "dulwich-0.21.7-cp311-cp311-win_amd64.whl", hash = "sha256:460ba74bdb19f8d498786ae7776745875059b1178066208c0fd509792d7f7bfc"}, - {file = "dulwich-0.21.7-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:4c51058ec4c0b45dc5189225b9e0c671b96ca9713c1daf71d622c13b0ab07681"}, - {file = "dulwich-0.21.7-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:4bc4c5366eaf26dda3fdffe160a3b515666ed27c2419f1d483da285ac1411de0"}, - {file = "dulwich-0.21.7-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a0650ec77d89cb947e3e4bbd4841c96f74e52b4650830112c3057a8ca891dc2f"}, - {file = "dulwich-0.21.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4f18f0a311fb7734b033a3101292b932158cade54b74d1c44db519e42825e5a2"}, - {file = "dulwich-0.21.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c589468e5c0cd84e97eb7ec209ab005a2cb69399e8c5861c3edfe38989ac3a8"}, - {file = "dulwich-0.21.7-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d62446797163317a397a10080c6397ffaaca51a7804c0120b334f8165736c56a"}, - {file = "dulwich-0.21.7-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:e84cc606b1f581733df4350ca4070e6a8b30be3662bbb81a590b177d0c996c91"}, - {file = "dulwich-0.21.7-cp312-cp312-win32.whl", hash = "sha256:c3d1685f320907a52c40fd5890627945c51f3a5fa4bcfe10edb24fec79caadec"}, - {file = "dulwich-0.21.7-cp312-cp312-win_amd64.whl", hash = "sha256:6bd69921fdd813b7469a3c77bc75c1783cc1d8d72ab15a406598e5a3ba1a1503"}, - {file = "dulwich-0.21.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7d8ab29c660125db52106775caa1f8f7f77a69ed1fe8bc4b42bdf115731a25bf"}, - {file = "dulwich-0.21.7-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b0d2e4485b98695bf95350ce9d38b1bb0aaac2c34ad00a0df789aa33c934469b"}, - {file = "dulwich-0.21.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e138d516baa6b5bafbe8f030eccc544d0d486d6819b82387fc0e285e62ef5261"}, - {file = "dulwich-0.21.7-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:f34bf9b9fa9308376263fd9ac43143c7c09da9bc75037bb75c6c2423a151b92c"}, - {file = "dulwich-0.21.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:2e2c66888207b71cd1daa2acb06d3984a6bc13787b837397a64117aa9fc5936a"}, - {file = "dulwich-0.21.7-cp37-cp37m-win32.whl", hash = "sha256:10893105c6566fc95bc2a67b61df7cc1e8f9126d02a1df6a8b2b82eb59db8ab9"}, - {file = "dulwich-0.21.7-cp37-cp37m-win_amd64.whl", hash = "sha256:460b3849d5c3d3818a80743b4f7a0094c893c559f678e56a02fff570b49a644a"}, - {file = "dulwich-0.21.7-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:74700e4c7d532877355743336c36f51b414d01e92ba7d304c4f8d9a5946dbc81"}, - {file = "dulwich-0.21.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c92e72c43c9e9e936b01a57167e0ea77d3fd2d82416edf9489faa87278a1cdf7"}, - {file = "dulwich-0.21.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d097e963eb6b9fa53266146471531ad9c6765bf390849230311514546ed64db2"}, - {file = "dulwich-0.21.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:808e8b9cc0aa9ac74870b49db4f9f39a52fb61694573f84b9c0613c928d4caf8"}, - {file = "dulwich-0.21.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1957b65f96e36c301e419d7adaadcff47647c30eb072468901bb683b1000bc5"}, - {file = "dulwich-0.21.7-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:4b09bc3a64fb70132ec14326ecbe6e0555381108caff3496898962c4136a48c6"}, - {file = "dulwich-0.21.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d5882e70b74ac3c736a42d3fdd4f5f2e6570637f59ad5d3e684760290b58f041"}, - {file = "dulwich-0.21.7-cp38-cp38-win32.whl", hash = "sha256:29bb5c1d70eba155ded41ed8a62be2f72edbb3c77b08f65b89c03976292f6d1b"}, - {file = "dulwich-0.21.7-cp38-cp38-win_amd64.whl", hash = "sha256:25c3ab8fb2e201ad2031ddd32e4c68b7c03cb34b24a5ff477b7a7dcef86372f5"}, - {file = "dulwich-0.21.7-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8929c37986c83deb4eb500c766ee28b6670285b512402647ee02a857320e377c"}, - {file = "dulwich-0.21.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:cc1e11be527ac06316539b57a7688bcb1b6a3e53933bc2f844397bc50734e9ae"}, - {file = "dulwich-0.21.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0fc3078a1ba04c588fabb0969d3530efd5cd1ce2cf248eefb6baf7cbc15fc285"}, - {file = "dulwich-0.21.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40dcbd29ba30ba2c5bfbab07a61a5f20095541d5ac66d813056c122244df4ac0"}, - {file = "dulwich-0.21.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8869fc8ec3dda743e03d06d698ad489b3705775fe62825e00fa95aa158097fc0"}, - {file = "dulwich-0.21.7-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d96ca5e0dde49376fbcb44f10eddb6c30284a87bd03bb577c59bb0a1f63903fa"}, - {file = "dulwich-0.21.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e0064363bd5e814359657ae32517fa8001e8573d9d040bd997908d488ab886ed"}, - {file = "dulwich-0.21.7-cp39-cp39-win32.whl", hash = "sha256:869eb7be48243e695673b07905d18b73d1054a85e1f6e298fe63ba2843bb2ca1"}, - {file = "dulwich-0.21.7-cp39-cp39-win_amd64.whl", hash = "sha256:404b8edeb3c3a86c47c0a498699fc064c93fa1f8bab2ffe919e8ab03eafaaad3"}, - {file = "dulwich-0.21.7-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e598d743c6c0548ebcd2baf94aa9c8bfacb787ea671eeeb5828cfbd7d56b552f"}, - {file = "dulwich-0.21.7-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d4a2d76c96426e791556836ef43542b639def81be4f1d6d4322cd886c115eae1"}, - {file = "dulwich-0.21.7-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6c88acb60a1f4d31bd6d13bfba465853b3df940ee4a0f2a3d6c7a0778c705b7"}, - {file = "dulwich-0.21.7-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ecd315847dea406a4decfa39d388a2521e4e31acde3bd9c2609c989e817c6d62"}, - {file = "dulwich-0.21.7-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:d05d3c781bc74e2c2a2a8f4e4e2ed693540fbe88e6ac36df81deac574a6dad99"}, - {file = "dulwich-0.21.7-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6de6f8de4a453fdbae8062a6faa652255d22a3d8bce0cd6d2d6701305c75f2b3"}, - {file = "dulwich-0.21.7-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e25953c7acbbe4e19650d0225af1c0c0e6882f8bddd2056f75c1cc2b109b88ad"}, - {file = "dulwich-0.21.7-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:4637cbd8ed1012f67e1068aaed19fcc8b649bcf3e9e26649826a303298c89b9d"}, - {file = "dulwich-0.21.7-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:858842b30ad6486aacaa607d60bab9c9a29e7c59dc2d9cb77ae5a94053878c08"}, - {file = "dulwich-0.21.7-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:739b191f61e1c4ce18ac7d520e7a7cbda00e182c3489552408237200ce8411ad"}, - {file = "dulwich-0.21.7-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:274c18ec3599a92a9b67abaf110e4f181a4f779ee1aaab9e23a72e89d71b2bd9"}, - {file = "dulwich-0.21.7-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:2590e9b431efa94fc356ae33b38f5e64f1834ec3a94a6ac3a64283b206d07aa3"}, - {file = "dulwich-0.21.7-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:ed60d1f610ef6437586f7768254c2a93820ccbd4cfdac7d182cf2d6e615969bb"}, - {file = "dulwich-0.21.7-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8278835e168dd097089f9e53088c7a69c6ca0841aef580d9603eafe9aea8c358"}, - {file = "dulwich-0.21.7-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ffc27fb063f740712e02b4d2f826aee8bbed737ed799962fef625e2ce56e2d29"}, - {file = "dulwich-0.21.7-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:61e3451bd3d3844f2dca53f131982553be4d1b1e1ebd9db701843dd76c4dba31"}, - {file = "dulwich-0.21.7.tar.gz", hash = "sha256:a9e9c66833cea580c3ac12927e4b9711985d76afca98da971405d414de60e968"}, -] - -[package.dependencies] -urllib3 = ">=1.25" - -[package.extras] -fastimport = ["fastimport"] -https = ["urllib3 (>=1.24.1)"] -paramiko = ["paramiko"] -pgp = ["gpg"] - [[package]] name = "ecdsa" version = "0.19.0" @@ -1092,36 +794,6 @@ typing-extensions = ">=4.8.0" all = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=2.11.2)", "orjson (>=3.2.1)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.7)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] standard = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "jinja2 (>=2.11.2)", "python-multipart (>=0.0.7)", "uvicorn[standard] (>=0.12.0)"] -[[package]] -name = "fastjsonschema" -version = "2.21.0" -description = "Fastest Python implementation of JSON schema" -optional = false -python-versions = "*" -files = [ - {file = "fastjsonschema-2.21.0-py3-none-any.whl", hash = "sha256:5b23b8e7c9c6adc0ecb91c03a0768cb48cd154d9159378a69c8318532e0b5cbf"}, - {file = "fastjsonschema-2.21.0.tar.gz", hash = "sha256:a02026bbbedc83729da3bfff215564b71902757f33f60089f1abae193daa4771"}, -] - -[package.extras] -devel = ["colorama", "json-spec", "jsonschema", "pylint", "pytest", "pytest-benchmark", "pytest-cache", "validictory"] - -[[package]] -name = "filelock" -version = "3.16.1" -description = "A platform independent file lock." -optional = false -python-versions = ">=3.8" -files = [ - {file = "filelock-3.16.1-py3-none-any.whl", hash = "sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0"}, - {file = "filelock-3.16.1.tar.gz", hash = "sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435"}, -] - -[package.extras] -docs = ["furo (>=2024.8.6)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4.1)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.6.1)", "diff-cover (>=9.2)", "pytest (>=8.3.3)", "pytest-asyncio (>=0.24)", "pytest-cov (>=5)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.26.4)"] -typing = ["typing-extensions (>=4.12.2)"] - [[package]] name = "h11" version = "0.14.0" @@ -1147,73 +819,6 @@ files = [ [package.extras] all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] -[[package]] -name = "importlib-metadata" -version = "8.5.0" -description = "Read metadata from Python packages" -optional = false -python-versions = ">=3.8" -files = [ - {file = "importlib_metadata-8.5.0-py3-none-any.whl", hash = "sha256:45e54197d28b7a7f1559e60b95e7c567032b602131fbd588f1497f47880aa68b"}, - {file = "importlib_metadata-8.5.0.tar.gz", hash = "sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7"}, -] - -[package.dependencies] -zipp = ">=3.20" - -[package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] -cover = ["pytest-cov"] -doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -enabler = ["pytest-enabler (>=2.2)"] -perf = ["ipython"] -test = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] -type = ["pytest-mypy"] - -[[package]] -name = "installer" -version = "0.7.0" -description = "A library for installing Python wheels." -optional = false -python-versions = ">=3.7" -files = [ - {file = "installer-0.7.0-py3-none-any.whl", hash = "sha256:05d1933f0a5ba7d8d6296bb6d5018e7c94fa473ceb10cf198a92ccea19c27b53"}, - {file = "installer-0.7.0.tar.gz", hash = "sha256:a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631"}, -] - -[[package]] -name = "jaraco-classes" -version = "3.4.0" -description = "Utility functions for Python class constructs" -optional = false -python-versions = ">=3.8" -files = [ - {file = "jaraco.classes-3.4.0-py3-none-any.whl", hash = "sha256:f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790"}, - {file = "jaraco.classes-3.4.0.tar.gz", hash = "sha256:47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd"}, -] - -[package.dependencies] -more-itertools = "*" - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)"] - -[[package]] -name = "jeepney" -version = "0.8.0" -description = "Low-level, pure Python DBus protocol wrapper." -optional = false -python-versions = ">=3.7" -files = [ - {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, - {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, -] - -[package.extras] -test = ["async-timeout", "pytest", "pytest-asyncio (>=0.17)", "pytest-trio", "testpath", "trio"] -trio = ["async_generator", "trio"] - [[package]] name = "jmespath" version = "1.0.1" @@ -1225,29 +830,6 @@ files = [ {file = "jmespath-1.0.1.tar.gz", hash = "sha256:90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe"}, ] -[[package]] -name = "keyring" -version = "24.3.1" -description = "Store and access your passwords safely." -optional = false -python-versions = ">=3.8" -files = [ - {file = "keyring-24.3.1-py3-none-any.whl", hash = "sha256:df38a4d7419a6a60fea5cef1e45a948a3e8430dd12ad88b0f423c5c143906218"}, - {file = "keyring-24.3.1.tar.gz", hash = "sha256:c3327b6ffafc0e8befbdb597cacdb4928ffe5c1212f7645f186e6d9957a898db"}, -] - -[package.dependencies] -importlib-metadata = {version = ">=4.11.4", markers = "python_version < \"3.12\""} -"jaraco.classes" = "*" -jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""} -pywin32-ctypes = {version = ">=0.2.0", markers = "sys_platform == \"win32\""} -SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} - -[package.extras] -completion = ["shtab (>=1.1.0)"] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)"] - [[package]] name = "langdetect" version = "1.0.9" @@ -1262,90 +844,6 @@ files = [ [package.dependencies] six = "*" -[[package]] -name = "more-itertools" -version = "10.5.0" -description = "More routines for operating on iterables, beyond itertools" -optional = false -python-versions = ">=3.8" -files = [ - {file = "more-itertools-10.5.0.tar.gz", hash = "sha256:5482bfef7849c25dc3c6dd53a6173ae4795da2a41a80faea6700d9f5846c5da6"}, - {file = "more_itertools-10.5.0-py3-none-any.whl", hash = "sha256:037b0d3203ce90cca8ab1defbbdac29d5f993fc20131f3664dc8d6acfa872aef"}, -] - -[[package]] -name = "msgpack" -version = "1.1.0" -description = "MessagePack serializer" -optional = false -python-versions = ">=3.8" -files = [ - {file = "msgpack-1.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7ad442d527a7e358a469faf43fda45aaf4ac3249c8310a82f0ccff9164e5dccd"}, - {file = "msgpack-1.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:74bed8f63f8f14d75eec75cf3d04ad581da6b914001b474a5d3cd3372c8cc27d"}, - {file = "msgpack-1.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:914571a2a5b4e7606997e169f64ce53a8b1e06f2cf2c3a7273aa106236d43dd5"}, - {file = "msgpack-1.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c921af52214dcbb75e6bdf6a661b23c3e6417f00c603dd2070bccb5c3ef499f5"}, - {file = "msgpack-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d8ce0b22b890be5d252de90d0e0d119f363012027cf256185fc3d474c44b1b9e"}, - {file = "msgpack-1.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:73322a6cc57fcee3c0c57c4463d828e9428275fb85a27aa2aa1a92fdc42afd7b"}, - {file = "msgpack-1.1.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:e1f3c3d21f7cf67bcf2da8e494d30a75e4cf60041d98b3f79875afb5b96f3a3f"}, - {file = "msgpack-1.1.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:64fc9068d701233effd61b19efb1485587560b66fe57b3e50d29c5d78e7fef68"}, - {file = "msgpack-1.1.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:42f754515e0f683f9c79210a5d1cad631ec3d06cea5172214d2176a42e67e19b"}, - {file = "msgpack-1.1.0-cp310-cp310-win32.whl", hash = "sha256:3df7e6b05571b3814361e8464f9304c42d2196808e0119f55d0d3e62cd5ea044"}, - {file = "msgpack-1.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:685ec345eefc757a7c8af44a3032734a739f8c45d1b0ac45efc5d8977aa4720f"}, - {file = "msgpack-1.1.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3d364a55082fb2a7416f6c63ae383fbd903adb5a6cf78c5b96cc6316dc1cedc7"}, - {file = "msgpack-1.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:79ec007767b9b56860e0372085f8504db5d06bd6a327a335449508bbee9648fa"}, - {file = "msgpack-1.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6ad622bf7756d5a497d5b6836e7fc3752e2dd6f4c648e24b1803f6048596f701"}, - {file = "msgpack-1.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e59bca908d9ca0de3dc8684f21ebf9a690fe47b6be93236eb40b99af28b6ea6"}, - {file = "msgpack-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5e1da8f11a3dd397f0a32c76165cf0c4eb95b31013a94f6ecc0b280c05c91b59"}, - {file = "msgpack-1.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:452aff037287acb1d70a804ffd022b21fa2bb7c46bee884dbc864cc9024128a0"}, - {file = "msgpack-1.1.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8da4bf6d54ceed70e8861f833f83ce0814a2b72102e890cbdfe4b34764cdd66e"}, - {file = "msgpack-1.1.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:41c991beebf175faf352fb940bf2af9ad1fb77fd25f38d9142053914947cdbf6"}, - {file = "msgpack-1.1.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a52a1f3a5af7ba1c9ace055b659189f6c669cf3657095b50f9602af3a3ba0fe5"}, - {file = "msgpack-1.1.0-cp311-cp311-win32.whl", hash = "sha256:58638690ebd0a06427c5fe1a227bb6b8b9fdc2bd07701bec13c2335c82131a88"}, - {file = "msgpack-1.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:fd2906780f25c8ed5d7b323379f6138524ba793428db5d0e9d226d3fa6aa1788"}, - {file = "msgpack-1.1.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:d46cf9e3705ea9485687aa4001a76e44748b609d260af21c4ceea7f2212a501d"}, - {file = "msgpack-1.1.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5dbad74103df937e1325cc4bfeaf57713be0b4f15e1c2da43ccdd836393e2ea2"}, - {file = "msgpack-1.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:58dfc47f8b102da61e8949708b3eafc3504509a5728f8b4ddef84bd9e16ad420"}, - {file = "msgpack-1.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4676e5be1b472909b2ee6356ff425ebedf5142427842aa06b4dfd5117d1ca8a2"}, - {file = "msgpack-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17fb65dd0bec285907f68b15734a993ad3fc94332b5bb21b0435846228de1f39"}, - {file = "msgpack-1.1.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a51abd48c6d8ac89e0cfd4fe177c61481aca2d5e7ba42044fd218cfd8ea9899f"}, - {file = "msgpack-1.1.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2137773500afa5494a61b1208619e3871f75f27b03bcfca7b3a7023284140247"}, - {file = "msgpack-1.1.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:398b713459fea610861c8a7b62a6fec1882759f308ae0795b5413ff6a160cf3c"}, - {file = "msgpack-1.1.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:06f5fd2f6bb2a7914922d935d3b8bb4a7fff3a9a91cfce6d06c13bc42bec975b"}, - {file = "msgpack-1.1.0-cp312-cp312-win32.whl", hash = "sha256:ad33e8400e4ec17ba782f7b9cf868977d867ed784a1f5f2ab46e7ba53b6e1e1b"}, - {file = "msgpack-1.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:115a7af8ee9e8cddc10f87636767857e7e3717b7a2e97379dc2054712693e90f"}, - {file = "msgpack-1.1.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:071603e2f0771c45ad9bc65719291c568d4edf120b44eb36324dcb02a13bfddf"}, - {file = "msgpack-1.1.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0f92a83b84e7c0749e3f12821949d79485971f087604178026085f60ce109330"}, - {file = "msgpack-1.1.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:4a1964df7b81285d00a84da4e70cb1383f2e665e0f1f2a7027e683956d04b734"}, - {file = "msgpack-1.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:59caf6a4ed0d164055ccff8fe31eddc0ebc07cf7326a2aaa0dbf7a4001cd823e"}, - {file = "msgpack-1.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0907e1a7119b337971a689153665764adc34e89175f9a34793307d9def08e6ca"}, - {file = "msgpack-1.1.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:65553c9b6da8166e819a6aa90ad15288599b340f91d18f60b2061f402b9a4915"}, - {file = "msgpack-1.1.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:7a946a8992941fea80ed4beae6bff74ffd7ee129a90b4dd5cf9c476a30e9708d"}, - {file = "msgpack-1.1.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:4b51405e36e075193bc051315dbf29168d6141ae2500ba8cd80a522964e31434"}, - {file = "msgpack-1.1.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b4c01941fd2ff87c2a934ee6055bda4ed353a7846b8d4f341c428109e9fcde8c"}, - {file = "msgpack-1.1.0-cp313-cp313-win32.whl", hash = "sha256:7c9a35ce2c2573bada929e0b7b3576de647b0defbd25f5139dcdaba0ae35a4cc"}, - {file = "msgpack-1.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:bce7d9e614a04d0883af0b3d4d501171fbfca038f12c77fa838d9f198147a23f"}, - {file = "msgpack-1.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c40ffa9a15d74e05ba1fe2681ea33b9caffd886675412612d93ab17b58ea2fec"}, - {file = "msgpack-1.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f1ba6136e650898082d9d5a5217d5906d1e138024f836ff48691784bbe1adf96"}, - {file = "msgpack-1.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e0856a2b7e8dcb874be44fea031d22e5b3a19121be92a1e098f46068a11b0870"}, - {file = "msgpack-1.1.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:471e27a5787a2e3f974ba023f9e265a8c7cfd373632247deb225617e3100a3c7"}, - {file = "msgpack-1.1.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:646afc8102935a388ffc3914b336d22d1c2d6209c773f3eb5dd4d6d3b6f8c1cb"}, - {file = "msgpack-1.1.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:13599f8829cfbe0158f6456374e9eea9f44eee08076291771d8ae93eda56607f"}, - {file = "msgpack-1.1.0-cp38-cp38-win32.whl", hash = "sha256:8a84efb768fb968381e525eeeb3d92857e4985aacc39f3c47ffd00eb4509315b"}, - {file = "msgpack-1.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:879a7b7b0ad82481c52d3c7eb99bf6f0645dbdec5134a4bddbd16f3506947feb"}, - {file = "msgpack-1.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:53258eeb7a80fc46f62fd59c876957a2d0e15e6449a9e71842b6d24419d88ca1"}, - {file = "msgpack-1.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7e7b853bbc44fb03fbdba34feb4bd414322180135e2cb5164f20ce1c9795ee48"}, - {file = "msgpack-1.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f3e9b4936df53b970513eac1758f3882c88658a220b58dcc1e39606dccaaf01c"}, - {file = "msgpack-1.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:46c34e99110762a76e3911fc923222472c9d681f1094096ac4102c18319e6468"}, - {file = "msgpack-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8a706d1e74dd3dea05cb54580d9bd8b2880e9264856ce5068027eed09680aa74"}, - {file = "msgpack-1.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:534480ee5690ab3cbed89d4c8971a5c631b69a8c0883ecfea96c19118510c846"}, - {file = "msgpack-1.1.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:8cf9e8c3a2153934a23ac160cc4cba0ec035f6867c8013cc6077a79823370346"}, - {file = "msgpack-1.1.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:3180065ec2abbe13a4ad37688b61b99d7f9e012a535b930e0e683ad6bc30155b"}, - {file = "msgpack-1.1.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:c5a91481a3cc573ac8c0d9aace09345d989dc4a0202b7fcb312c88c26d4e71a8"}, - {file = "msgpack-1.1.0-cp39-cp39-win32.whl", hash = "sha256:f80bc7d47f76089633763f952e67f8214cb7b3ee6bfa489b3cb6a84cfac114cd"}, - {file = "msgpack-1.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:4d1b7ff2d6146e16e8bd665ac726a89c74163ef8cd39fa8c1087d4e52d3a2325"}, - {file = "msgpack-1.1.0.tar.gz", hash = "sha256:dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e"}, -] - [[package]] name = "mypy" version = "1.13.0" @@ -1473,20 +971,6 @@ files = [ {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, ] -[[package]] -name = "pexpect" -version = "4.9.0" -description = "Pexpect allows easy control of interactive console applications." -optional = false -python-versions = "*" -files = [ - {file = "pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523"}, - {file = "pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f"}, -] - -[package.dependencies] -ptyprocess = ">=0.5" - [[package]] name = "pg8000" version = "1.31.2" @@ -1502,20 +986,6 @@ files = [ python-dateutil = ">=2.8.2" scramp = ">=1.4.5" -[[package]] -name = "pkginfo" -version = "1.11.2" -description = "Query metadata from sdists / bdists / installed packages." -optional = false -python-versions = ">=3.8" -files = [ - {file = "pkginfo-1.11.2-py3-none-any.whl", hash = "sha256:9ec518eefccd159de7ed45386a6bb4c6ca5fa2cb3bd9b71154fae44f6f1b36a3"}, - {file = "pkginfo-1.11.2.tar.gz", hash = "sha256:c6bc916b8298d159e31f2c216e35ee5b86da7da18874f879798d0a1983537c86"}, -] - -[package.extras] -testing = ["pytest", "pytest-cov", "wheel"] - [[package]] name = "platformdirs" version = "4.3.6" @@ -1532,67 +1002,6 @@ docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.0.2)", "sphinx-a test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.2)", "pytest-cov (>=5)", "pytest-mock (>=3.14)"] type = ["mypy (>=1.11.2)"] -[[package]] -name = "poetry" -version = "1.8.4" -description = "Python dependency management and packaging made easy." -optional = false -python-versions = "<4.0,>=3.8" -files = [ - {file = "poetry-1.8.4-py3-none-any.whl", hash = "sha256:1223bb6dfdbdfbebc6790796b9b7a88ea1f1f4679e709594f698499010ffb129"}, - {file = "poetry-1.8.4.tar.gz", hash = "sha256:5490f8da66d17eecd660e091281f8aaa5554381644540291817c249872c99202"}, -] - -[package.dependencies] -build = ">=1.0.3,<2.0.0" -cachecontrol = {version = ">=0.14.0,<0.15.0", extras = ["filecache"]} -cleo = ">=2.1.0,<3.0.0" -crashtest = ">=0.4.1,<0.5.0" -dulwich = ">=0.21.2,<0.22.0" -fastjsonschema = ">=2.18.0,<3.0.0" -installer = ">=0.7.0,<0.8.0" -keyring = ">=24.0.0,<25.0.0" -packaging = ">=23.1" -pexpect = ">=4.7.0,<5.0.0" -pkginfo = ">=1.10,<2.0" -platformdirs = ">=3.0.0,<5" -poetry-core = "1.9.1" -poetry-plugin-export = ">=1.6.0,<2.0.0" -pyproject-hooks = ">=1.0.0,<2.0.0" -requests = ">=2.26,<3.0" -requests-toolbelt = ">=1.0.0,<2.0.0" -shellingham = ">=1.5,<2.0" -tomlkit = ">=0.11.4,<1.0.0" -trove-classifiers = ">=2022.5.19" -virtualenv = ">=20.26.6,<21.0.0" -xattr = {version = ">=1.0.0,<2.0.0", markers = "sys_platform == \"darwin\""} - -[[package]] -name = "poetry-core" -version = "1.9.1" -description = "Poetry PEP 517 Build Backend" -optional = false -python-versions = "<4.0,>=3.8" -files = [ - {file = "poetry_core-1.9.1-py3-none-any.whl", hash = "sha256:6f45dd3598e0de8d9b0367360253d4c5d4d0110c8f5c71120a14f0e0f116c1a0"}, - {file = "poetry_core-1.9.1.tar.gz", hash = "sha256:7a2d49214bf58b4f17f99d6891d947a9836c9899a67a5069f52d7b67217f61b8"}, -] - -[[package]] -name = "poetry-plugin-export" -version = "1.8.0" -description = "Poetry plugin to export the dependencies to various formats" -optional = false -python-versions = "<4.0,>=3.8" -files = [ - {file = "poetry_plugin_export-1.8.0-py3-none-any.whl", hash = "sha256:adbe232cfa0cc04991ea3680c865cf748bff27593b9abcb1f35fb50ed7ba2c22"}, - {file = "poetry_plugin_export-1.8.0.tar.gz", hash = "sha256:1fa6168a85d59395d835ca564bc19862a7c76061e60c3e7dfaec70d50937fc61"}, -] - -[package.dependencies] -poetry = ">=1.8.0,<3.0.0" -poetry-core = ">=1.7.0,<3.0.0" - [[package]] name = "primp" version = "0.8.1" @@ -1614,17 +1023,6 @@ files = [ [package.extras] dev = ["certifi", "pytest (>=8.1.1)"] -[[package]] -name = "ptyprocess" -version = "0.7.0" -description = "Run a subprocess in a pseudo terminal" -optional = false -python-versions = "*" -files = [ - {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, - {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, -] - [[package]] name = "py" version = "1.11.0" @@ -1647,17 +1045,6 @@ files = [ {file = "pyasn1-0.6.1.tar.gz", hash = "sha256:6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034"}, ] -[[package]] -name = "pycparser" -version = "2.22" -description = "C parser in Python" -optional = false -python-versions = ">=3.8" -files = [ - {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, - {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, -] - [[package]] name = "pydantic" version = "2.10.2" @@ -1801,17 +1188,6 @@ files = [ {file = "pyhumps-3.8.0.tar.gz", hash = "sha256:498026258f7ee1a8e447c2e28526c0bea9407f9a59c03260aee4bd6c04d681a3"}, ] -[[package]] -name = "pyproject-hooks" -version = "1.2.0" -description = "Wrappers to call pyproject.toml-based build backend hooks." -optional = false -python-versions = ">=3.7" -files = [ - {file = "pyproject_hooks-1.2.0-py3-none-any.whl", hash = "sha256:9e5c6bfa8dcc30091c74b0cf803c81fdd29d94f01992a7707bc97babb1141913"}, - {file = "pyproject_hooks-1.2.0.tar.gz", hash = "sha256:1e859bd5c40fae9448642dd871adf459e5e2084186e8d2c2a79a824c970da1f8"}, -] - [[package]] name = "python-dateutil" version = "2.9.0.post0" @@ -1858,117 +1234,6 @@ files = [ {file = "python_ulid-1.1.0-py3-none-any.whl", hash = "sha256:88c952f6be133dbede19c907d72d26717d2691ec8421512b573144794d891e24"}, ] -[[package]] -name = "pywin32-ctypes" -version = "0.2.3" -description = "A (partial) reimplementation of pywin32 using ctypes/cffi" -optional = false -python-versions = ">=3.6" -files = [ - {file = "pywin32-ctypes-0.2.3.tar.gz", hash = "sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755"}, - {file = "pywin32_ctypes-0.2.3-py3-none-any.whl", hash = "sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8"}, -] - -[[package]] -name = "rapidfuzz" -version = "3.10.1" -description = "rapid fuzzy string matching" -optional = false -python-versions = ">=3.9" -files = [ - {file = "rapidfuzz-3.10.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f17d9f21bf2f2f785d74f7b0d407805468b4c173fa3e52c86ec94436b338e74a"}, - {file = "rapidfuzz-3.10.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b31f358a70efc143909fb3d75ac6cd3c139cd41339aa8f2a3a0ead8315731f2b"}, - {file = "rapidfuzz-3.10.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f4f43f2204b56a61448ec2dd061e26fd344c404da99fb19f3458200c5874ba2"}, - {file = "rapidfuzz-3.10.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9d81bf186a453a2757472133b24915768abc7c3964194406ed93e170e16c21cb"}, - {file = "rapidfuzz-3.10.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3611c8f45379a12063d70075c75134f2a8bd2e4e9b8a7995112ddae95ca1c982"}, - {file = "rapidfuzz-3.10.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3c3b537b97ac30da4b73930fa8a4fe2f79c6d1c10ad535c5c09726612cd6bed9"}, - {file = "rapidfuzz-3.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:231ef1ec9cf7b59809ce3301006500b9d564ddb324635f4ea8f16b3e2a1780da"}, - {file = "rapidfuzz-3.10.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ed4f3adc1294834955b7e74edd3c6bd1aad5831c007f2d91ea839e76461a5879"}, - {file = "rapidfuzz-3.10.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:7b6015da2e707bf632a71772a2dbf0703cff6525732c005ad24987fe86e8ec32"}, - {file = "rapidfuzz-3.10.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:1b35a118d61d6f008e8e3fb3a77674d10806a8972c7b8be433d6598df4d60b01"}, - {file = "rapidfuzz-3.10.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:bc308d79a7e877226f36bdf4e149e3ed398d8277c140be5c1fd892ec41739e6d"}, - {file = "rapidfuzz-3.10.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f017dbfecc172e2d0c37cf9e3d519179d71a7f16094b57430dffc496a098aa17"}, - {file = "rapidfuzz-3.10.1-cp310-cp310-win32.whl", hash = "sha256:36c0e1483e21f918d0f2f26799fe5ac91c7b0c34220b73007301c4f831a9c4c7"}, - {file = "rapidfuzz-3.10.1-cp310-cp310-win_amd64.whl", hash = "sha256:10746c1d4c8cd8881c28a87fd7ba0c9c102346dfe7ff1b0d021cdf093e9adbff"}, - {file = "rapidfuzz-3.10.1-cp310-cp310-win_arm64.whl", hash = "sha256:dfa64b89dcb906835e275187569e51aa9d546a444489e97aaf2cc84011565fbe"}, - {file = "rapidfuzz-3.10.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:92958ae075c87fef393f835ed02d4fe8d5ee2059a0934c6c447ea3417dfbf0e8"}, - {file = "rapidfuzz-3.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ba7521e072c53e33c384e78615d0718e645cab3c366ecd3cc8cb732befd94967"}, - {file = "rapidfuzz-3.10.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:00d02cbd75d283c287471b5b3738b3e05c9096150f93f2d2dfa10b3d700f2db9"}, - {file = "rapidfuzz-3.10.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:efa1582a397da038e2f2576c9cd49b842f56fde37d84a6b0200ffebc08d82350"}, - {file = "rapidfuzz-3.10.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f12912acee1f506f974f58de9fdc2e62eea5667377a7e9156de53241c05fdba8"}, - {file = "rapidfuzz-3.10.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:666d5d8b17becc3f53447bcb2b6b33ce6c2df78792495d1fa82b2924cd48701a"}, - {file = "rapidfuzz-3.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26f71582c0d62445067ee338ddad99b655a8f4e4ed517a90dcbfbb7d19310474"}, - {file = "rapidfuzz-3.10.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8a2ef08b27167bcff230ffbfeedd4c4fa6353563d6aaa015d725dd3632fc3de7"}, - {file = "rapidfuzz-3.10.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:365e4fc1a2b95082c890f5e98489b894e6bf8c338c6ac89bb6523c2ca6e9f086"}, - {file = "rapidfuzz-3.10.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:1996feb7a61609fa842e6b5e0c549983222ffdedaf29644cc67e479902846dfe"}, - {file = "rapidfuzz-3.10.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:cf654702f144beaa093103841a2ea6910d617d0bb3fccb1d1fd63c54dde2cd49"}, - {file = "rapidfuzz-3.10.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ec108bf25de674781d0a9a935030ba090c78d49def3d60f8724f3fc1e8e75024"}, - {file = "rapidfuzz-3.10.1-cp311-cp311-win32.whl", hash = "sha256:031f8b367e5d92f7a1e27f7322012f3c321c3110137b43cc3bf678505583ef48"}, - {file = "rapidfuzz-3.10.1-cp311-cp311-win_amd64.whl", hash = "sha256:f98f36c6a1bb9a6c8bbec99ad87c8c0e364f34761739b5ea9adf7b48129ae8cf"}, - {file = "rapidfuzz-3.10.1-cp311-cp311-win_arm64.whl", hash = "sha256:f1da2028cb4e41be55ee797a82d6c1cf589442504244249dfeb32efc608edee7"}, - {file = "rapidfuzz-3.10.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:1340b56340896bede246f612b6ecf685f661a56aabef3d2512481bfe23ac5835"}, - {file = "rapidfuzz-3.10.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2316515169b7b5a453f0ce3adbc46c42aa332cae9f2edb668e24d1fc92b2f2bb"}, - {file = "rapidfuzz-3.10.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e06fe6a12241ec1b72c0566c6b28cda714d61965d86569595ad24793d1ab259"}, - {file = "rapidfuzz-3.10.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d99c1cd9443b19164ec185a7d752f4b4db19c066c136f028991a480720472e23"}, - {file = "rapidfuzz-3.10.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a1d9aa156ed52d3446388ba4c2f335e312191d1ca9d1f5762ee983cf23e4ecf6"}, - {file = "rapidfuzz-3.10.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:54bcf4efaaee8e015822be0c2c28214815f4f6b4f70d8362cfecbd58a71188ac"}, - {file = "rapidfuzz-3.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0c955e32afdbfdf6e9ee663d24afb25210152d98c26d22d399712d29a9b976b"}, - {file = "rapidfuzz-3.10.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:191633722203f5b7717efcb73a14f76f3b124877d0608c070b827c5226d0b972"}, - {file = "rapidfuzz-3.10.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:195baad28057ec9609e40385991004e470af9ef87401e24ebe72c064431524ab"}, - {file = "rapidfuzz-3.10.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:0fff4a6b87c07366662b62ae994ffbeadc472e72f725923f94b72a3db49f4671"}, - {file = "rapidfuzz-3.10.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:4ffed25f9fdc0b287f30a98467493d1e1ce5b583f6317f70ec0263b3c97dbba6"}, - {file = "rapidfuzz-3.10.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:d02cf8e5af89a9ac8f53c438ddff6d773f62c25c6619b29db96f4aae248177c0"}, - {file = "rapidfuzz-3.10.1-cp312-cp312-win32.whl", hash = "sha256:f3bb81d4fe6a5d20650f8c0afcc8f6e1941f6fecdb434f11b874c42467baded0"}, - {file = "rapidfuzz-3.10.1-cp312-cp312-win_amd64.whl", hash = "sha256:aaf83e9170cb1338922ae42d320699dccbbdca8ffed07faeb0b9257822c26e24"}, - {file = "rapidfuzz-3.10.1-cp312-cp312-win_arm64.whl", hash = "sha256:c5da802a0d085ad81b0f62828fb55557996c497b2d0b551bbdfeafd6d447892f"}, - {file = "rapidfuzz-3.10.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:fc22d69a1c9cccd560a5c434c0371b2df0f47c309c635a01a913e03bbf183710"}, - {file = "rapidfuzz-3.10.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:38b0dac2c8e057562b8f0d8ae5b663d2d6a28c5ab624de5b73cef9abb6129a24"}, - {file = "rapidfuzz-3.10.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fde3bbb14e92ce8fcb5c2edfff72e474d0080cadda1c97785bf4822f037a309"}, - {file = "rapidfuzz-3.10.1-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9141fb0592e55f98fe9ac0f3ce883199b9c13e262e0bf40c5b18cdf926109d16"}, - {file = "rapidfuzz-3.10.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:237bec5dd1bfc9b40bbd786cd27949ef0c0eb5fab5eb491904c6b5df59d39d3c"}, - {file = "rapidfuzz-3.10.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:18123168cba156ab5794ea6de66db50f21bb3c66ae748d03316e71b27d907b95"}, - {file = "rapidfuzz-3.10.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b75fe506c8e02769cc47f5ab21ce3e09b6211d3edaa8f8f27331cb6988779be"}, - {file = "rapidfuzz-3.10.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:9da82aa4b46973aaf9e03bb4c3d6977004648c8638febfc0f9d237e865761270"}, - {file = "rapidfuzz-3.10.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:c34c022d5ad564f1a5a57a4a89793bd70d7bad428150fb8ff2760b223407cdcf"}, - {file = "rapidfuzz-3.10.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:1e96c84d6c2a0ca94e15acb5399118fff669f4306beb98a6d8ec6f5dccab4412"}, - {file = "rapidfuzz-3.10.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:e8e154b84a311263e1aca86818c962e1fa9eefdd643d1d5d197fcd2738f88cb9"}, - {file = "rapidfuzz-3.10.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:335fee93188f8cd585552bb8057228ce0111bd227fa81bfd40b7df6b75def8ab"}, - {file = "rapidfuzz-3.10.1-cp313-cp313-win32.whl", hash = "sha256:6729b856166a9e95c278410f73683957ea6100c8a9d0a8dbe434c49663689255"}, - {file = "rapidfuzz-3.10.1-cp313-cp313-win_amd64.whl", hash = "sha256:0e06d99ad1ad97cb2ef7f51ec6b1fedd74a3a700e4949353871cf331d07b382a"}, - {file = "rapidfuzz-3.10.1-cp313-cp313-win_arm64.whl", hash = "sha256:8d1b7082104d596a3eb012e0549b2634ed15015b569f48879701e9d8db959dbb"}, - {file = "rapidfuzz-3.10.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:779027d3307e1a2b1dc0c03c34df87a470a368a1a0840a9d2908baf2d4067956"}, - {file = "rapidfuzz-3.10.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:440b5608ab12650d0390128d6858bc839ae77ffe5edf0b33a1551f2fa9860651"}, - {file = "rapidfuzz-3.10.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82cac41a411e07a6f3dc80dfbd33f6be70ea0abd72e99c59310819d09f07d945"}, - {file = "rapidfuzz-3.10.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:958473c9f0bca250590200fd520b75be0dbdbc4a7327dc87a55b6d7dc8d68552"}, - {file = "rapidfuzz-3.10.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9ef60dfa73749ef91cb6073be1a3e135f4846ec809cc115f3cbfc6fe283a5584"}, - {file = "rapidfuzz-3.10.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a7fbac18f2c19fc983838a60611e67e3262e36859994c26f2ee85bb268de2355"}, - {file = "rapidfuzz-3.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9a0d519ff39db887cd73f4e297922786d548f5c05d6b51f4e6754f452a7f4296"}, - {file = "rapidfuzz-3.10.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:bebb7bc6aeb91cc57e4881b222484c26759ca865794187217c9dcea6c33adae6"}, - {file = "rapidfuzz-3.10.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:fe07f8b9c3bb5c5ad1d2c66884253e03800f4189a60eb6acd6119ebaf3eb9894"}, - {file = "rapidfuzz-3.10.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:bfa48a4a2d45a41457f0840c48e579db157a927f4e97acf6e20df8fc521c79de"}, - {file = "rapidfuzz-3.10.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:2cf44d01bfe8ee605b7eaeecbc2b9ca64fc55765f17b304b40ed8995f69d7716"}, - {file = "rapidfuzz-3.10.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1e6bbca9246d9eedaa1c84e04a7f555493ba324d52ae4d9f3d9ddd1b740dcd87"}, - {file = "rapidfuzz-3.10.1-cp39-cp39-win32.whl", hash = "sha256:567f88180f2c1423b4fe3f3ad6e6310fc97b85bdba574801548597287fc07028"}, - {file = "rapidfuzz-3.10.1-cp39-cp39-win_amd64.whl", hash = "sha256:6b2cd7c29d6ecdf0b780deb587198f13213ac01c430ada6913452fd0c40190fc"}, - {file = "rapidfuzz-3.10.1-cp39-cp39-win_arm64.whl", hash = "sha256:9f912d459e46607ce276128f52bea21ebc3e9a5ccf4cccfef30dd5bddcf47be8"}, - {file = "rapidfuzz-3.10.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:ac4452f182243cfab30ba4668ef2de101effaedc30f9faabb06a095a8c90fd16"}, - {file = "rapidfuzz-3.10.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:565c2bd4f7d23c32834652b27b51dd711814ab614b4e12add8476be4e20d1cf5"}, - {file = "rapidfuzz-3.10.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:187d9747149321607be4ccd6f9f366730078bed806178ec3eeb31d05545e9e8f"}, - {file = "rapidfuzz-3.10.1-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:616290fb9a8fa87e48cb0326d26f98d4e29f17c3b762c2d586f2b35c1fd2034b"}, - {file = "rapidfuzz-3.10.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:073a5b107e17ebd264198b78614c0206fa438cce749692af5bc5f8f484883f50"}, - {file = "rapidfuzz-3.10.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:39c4983e2e2ccb9732f3ac7d81617088822f4a12291d416b09b8a1eadebb3e29"}, - {file = "rapidfuzz-3.10.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:ac7adee6bcf0c6fee495d877edad1540a7e0f5fc208da03ccb64734b43522d7a"}, - {file = "rapidfuzz-3.10.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:425f4ac80b22153d391ee3f94bc854668a0c6c129f05cf2eaf5ee74474ddb69e"}, - {file = "rapidfuzz-3.10.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:65a2fa13e8a219f9b5dcb9e74abe3ced5838a7327e629f426d333dfc8c5a6e66"}, - {file = "rapidfuzz-3.10.1-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:75561f3df9a906aaa23787e9992b228b1ab69007932dc42070f747103e177ba8"}, - {file = "rapidfuzz-3.10.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:edd062490537e97ca125bc6c7f2b7331c2b73d21dc304615afe61ad1691e15d5"}, - {file = "rapidfuzz-3.10.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:cfcc8feccf63245a22dfdd16e222f1a39771a44b870beb748117a0e09cbb4a62"}, - {file = "rapidfuzz-3.10.1.tar.gz", hash = "sha256:5a15546d847a915b3f42dc79ef9b0c78b998b4e2c53b252e7166284066585979"}, -] - -[package.extras] -all = ["numpy"] - [[package]] name = "requests" version = "2.32.3" @@ -1990,20 +1255,6 @@ urllib3 = ">=1.21.1,<3" socks = ["PySocks (>=1.5.6,!=1.5.7)"] use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] -[[package]] -name = "requests-toolbelt" -version = "1.0.0" -description = "A utility belt for advanced users of python-requests" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -files = [ - {file = "requests-toolbelt-1.0.0.tar.gz", hash = "sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6"}, - {file = "requests_toolbelt-1.0.0-py2.py3-none-any.whl", hash = "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06"}, -] - -[package.dependencies] -requests = ">=2.0.1,<3.0.0" - [[package]] name = "retry" version = "0.9.2" @@ -2064,32 +1315,6 @@ files = [ [package.dependencies] asn1crypto = ">=1.5.1" -[[package]] -name = "secretstorage" -version = "3.3.3" -description = "Python bindings to FreeDesktop.org Secret Service API" -optional = false -python-versions = ">=3.6" -files = [ - {file = "SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99"}, - {file = "SecretStorage-3.3.3.tar.gz", hash = "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77"}, -] - -[package.dependencies] -cryptography = ">=2.0" -jeepney = ">=0.6" - -[[package]] -name = "shellingham" -version = "1.5.4" -description = "Tool to Detect Surrounding Shell" -optional = false -python-versions = ">=3.7" -files = [ - {file = "shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686"}, - {file = "shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de"}, -] - [[package]] name = "six" version = "1.16.0" @@ -2144,28 +1369,6 @@ files = [ doc = ["reno", "sphinx"] test = ["pytest", "tornado (>=4.5)", "typeguard"] -[[package]] -name = "tomlkit" -version = "0.13.2" -description = "Style preserving TOML library" -optional = false -python-versions = ">=3.8" -files = [ - {file = "tomlkit-0.13.2-py3-none-any.whl", hash = "sha256:7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde"}, - {file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"}, -] - -[[package]] -name = "trove-classifiers" -version = "2024.10.21.16" -description = "Canonical source for classifiers on PyPI (pypi.org)." -optional = false -python-versions = "*" -files = [ - {file = "trove_classifiers-2024.10.21.16-py3-none-any.whl", hash = "sha256:0fb11f1e995a757807a8ef1c03829fbd4998d817319abcef1f33165750f103be"}, - {file = "trove_classifiers-2024.10.21.16.tar.gz", hash = "sha256:17cbd055d67d5e9d9de63293a8732943fabc21574e4c7b74edf112b4928cf5f3"}, -] - [[package]] name = "types-awscrt" version = "0.23.1" @@ -2259,119 +1462,7 @@ h11 = ">=0.8" [package.extras] standard = ["colorama (>=0.4)", "httptools (>=0.6.3)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"] -[[package]] -name = "virtualenv" -version = "20.28.0" -description = "Virtual Python Environment builder" -optional = false -python-versions = ">=3.8" -files = [ - {file = "virtualenv-20.28.0-py3-none-any.whl", hash = "sha256:23eae1b4516ecd610481eda647f3a7c09aea295055337331bb4e6892ecce47b0"}, - {file = "virtualenv-20.28.0.tar.gz", hash = "sha256:2c9c3262bb8e7b87ea801d715fae4495e6032450c71d2309be9550e7364049aa"}, -] - -[package.dependencies] -distlib = ">=0.3.7,<1" -filelock = ">=3.12.2,<4" -platformdirs = ">=3.9.1,<5" - -[package.extras] -docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2,!=7.3)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] -test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8)", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10)"] - -[[package]] -name = "xattr" -version = "1.1.0" -description = "Python wrapper for extended filesystem attributes" -optional = false -python-versions = ">=3.8" -files = [ - {file = "xattr-1.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ef2fa0f85458736178fd3dcfeb09c3cf423f0843313e25391db2cfd1acec8888"}, - {file = "xattr-1.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ccab735d0632fe71f7d72e72adf886f45c18b7787430467ce0070207882cfe25"}, - {file = "xattr-1.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9013f290387f1ac90bccbb1926555ca9aef75651271098d99217284d9e010f7c"}, - {file = "xattr-1.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9dcd5dfbcee73c7be057676ecb900cabb46c691aff4397bf48c579ffb30bb963"}, - {file = "xattr-1.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6480589c1dac7785d1f851347a32c4a97305937bf7b488b857fe8b28a25de9e9"}, - {file = "xattr-1.1.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:08f61cbed52dc6f7c181455826a9ff1e375ad86f67dd9d5eb7663574abb32451"}, - {file = "xattr-1.1.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:918e1f83f2e8a072da2671eac710871ee5af337e9bf8554b5ce7f20cdb113186"}, - {file = "xattr-1.1.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:0f06e0c1e4d06b4e0e49aaa1184b6f0e81c3758c2e8365597918054890763b53"}, - {file = "xattr-1.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:46a641ac038a9f53d2f696716147ca4dbd6a01998dc9cd4bc628801bc0df7f4d"}, - {file = "xattr-1.1.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7e4ca0956fd11679bb2e0c0d6b9cdc0f25470cc00d8da173bb7656cc9a9cf104"}, - {file = "xattr-1.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6881b120f9a4b36ccd8a28d933bc0f6e1de67218b6ce6e66874e0280fc006844"}, - {file = "xattr-1.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dab29d9288aa28e68a6f355ddfc3f0a7342b40c9012798829f3e7bd765e85c2c"}, - {file = "xattr-1.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e0c80bbf55339c93770fc294b4b6586b5bf8e85ec00a4c2d585c33dbd84b5006"}, - {file = "xattr-1.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d1418705f253b6b6a7224b69773842cac83fcbcd12870354b6e11dd1cd54630f"}, - {file = "xattr-1.1.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:687e7d18611ef8d84a6ecd8f4d1ab6757500c1302f4c2046ce0aa3585e13da3f"}, - {file = "xattr-1.1.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b6ceb9efe0657a982ccb8b8a2efe96b690891779584c901d2f920784e5d20ae3"}, - {file = "xattr-1.1.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:b489b7916f239100956ea0b39c504f3c3a00258ba65677e4c8ba1bd0b5513446"}, - {file = "xattr-1.1.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:0a9c431b0e66516a078125e9a273251d4b8e5ba84fe644b619f2725050d688a0"}, - {file = "xattr-1.1.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:1a5921ea3313cc1c57f2f53b63ea8ca9a91e48f4cc7ebec057d2447ec82c7efe"}, - {file = "xattr-1.1.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f6ad2a7bd5e6cf71d4a862413234a067cf158ca0ae94a40d4b87b98b62808498"}, - {file = "xattr-1.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0683dae7609f7280b0c89774d00b5957e6ffcb181c6019c46632b389706b77e6"}, - {file = "xattr-1.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54cb15cd94e5ef8a0ef02309f1bf973ba0e13c11e87686e983f371948cfee6af"}, - {file = "xattr-1.1.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ff6223a854229055e803c2ad0c0ea9a6da50c6be30d92c198cf5f9f28819a921"}, - {file = "xattr-1.1.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d44e8f955218638c9ab222eed21e9bd9ab430d296caf2176fb37abe69a714e5c"}, - {file = "xattr-1.1.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:caab2c2986c30f92301f12e9c50415d324412e8e6a739a52a603c3e6a54b3610"}, - {file = "xattr-1.1.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:d6eb7d5f281014cd44e2d847a9107491af1bf3087f5afeded75ed3e37ec87239"}, - {file = "xattr-1.1.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:47a3bdfe034b4fdb70e5941d97037405e3904accc28e10dbef6d1c9061fb6fd7"}, - {file = "xattr-1.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:00d2b415cf9d6a24112d019e721aa2a85652f7bbc9f3b9574b2d1cd8668eb491"}, - {file = "xattr-1.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:78b377832dd0ee408f9f121a354082c6346960f7b6b1480483ed0618b1912120"}, - {file = "xattr-1.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6461a43b585e5f2e049b39bcbfcb6391bfef3c5118231f1b15d10bdb89ef17fe"}, - {file = "xattr-1.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:24d97f0d28f63695e3344ffdabca9fcc30c33e5c8ccc198c7524361a98d526f2"}, - {file = "xattr-1.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ad47d89968c9097900607457a0c89160b4771601d813e769f68263755516065"}, - {file = "xattr-1.1.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc53cab265f6e8449bd683d5ee3bc5a191e6dd940736f3de1a188e6da66b0653"}, - {file = "xattr-1.1.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cd11e917f5b89f2a0ad639d9875943806c6c9309a3dd02da5a3e8ef92db7bed9"}, - {file = "xattr-1.1.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:9c5a78c7558989492c4cb7242e490ffb03482437bf782967dfff114e44242343"}, - {file = "xattr-1.1.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:cebcf8a303a44fbc439b68321408af7267507c0d8643229dbb107f6c132d389c"}, - {file = "xattr-1.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b0d73150f2f9655b4da01c2369eb33a294b7f9d56eccb089819eafdbeb99f896"}, - {file = "xattr-1.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:793c01deaadac50926c0e1481702133260c7cb5e62116762f6fe1543d07b826f"}, - {file = "xattr-1.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e189e440bcd04ccaad0474720abee6ee64890823ec0db361fb0a4fb5e843a1bf"}, - {file = "xattr-1.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afacebbc1fa519f41728f8746a92da891c7755e6745164bd0d5739face318e86"}, - {file = "xattr-1.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9b1664edf003153ac8d1911e83a0fc60db1b1b374ee8ac943f215f93754a1102"}, - {file = "xattr-1.1.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dda2684228798e937a7c29b0e1c7ef3d70e2b85390a69b42a1c61b2039ba81de"}, - {file = "xattr-1.1.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b735ac2625a4fc2c9343b19f806793db6494336338537d2911c8ee4c390dda46"}, - {file = "xattr-1.1.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:fa6a7af7a4ada43f15ccc58b6f9adcdbff4c36ba040013d2681e589e07ae280a"}, - {file = "xattr-1.1.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d1059b2f726e2702c8bbf9bbf369acfc042202a4cc576c2dec6791234ad5e948"}, - {file = "xattr-1.1.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e2255f36ebf2cb2dbf772a7437ad870836b7396e60517211834cf66ce678b595"}, - {file = "xattr-1.1.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dba4f80b9855cc98513ddf22b7ad8551bc448c70d3147799ea4f6c0b758fb466"}, - {file = "xattr-1.1.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4cb70c16e7c3ae6ba0ab6c6835c8448c61d8caf43ea63b813af1f4dbe83dd156"}, - {file = "xattr-1.1.0-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:83652910ef6a368b77b00825ad67815e5c92bfab551a848ca66e9981d14a7519"}, - {file = "xattr-1.1.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:7a92aff66c43fa3e44cbeab7cbeee66266c91178a0f595e044bf3ce51485743b"}, - {file = "xattr-1.1.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9d4f71b673339aeaae1f6ea9ef8ea6c9643c8cd0df5003b9a0eaa75403e2e06c"}, - {file = "xattr-1.1.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a20de1c47b5cd7b47da61799a3b34e11e5815d716299351f82a88627a43f9a96"}, - {file = "xattr-1.1.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:23705c7079b05761ff2fa778ad17396e7599c8759401abc05b312dfb3bc99f69"}, - {file = "xattr-1.1.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:27272afeba8422f2a9d27e1080a9a7b807394e88cce73db9ed8d2dde3afcfb87"}, - {file = "xattr-1.1.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd43978966de3baf4aea367c99ffa102b289d6c2ea5f3d9ce34a203dc2f2ab73"}, - {file = "xattr-1.1.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ded771eaf27bb4eb3c64c0d09866460ee8801d81dc21097269cf495b3cac8657"}, - {file = "xattr-1.1.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:96ca300c0acca4f0cddd2332bb860ef58e1465d376364f0e72a1823fdd58e90d"}, - {file = "xattr-1.1.0.tar.gz", hash = "sha256:fecbf3b05043ed3487a28190dec3e4c4d879b2fcec0e30bafd8ec5d4b6043630"}, -] - -[package.dependencies] -cffi = ">=1.16.0" - -[package.extras] -test = ["pytest"] - -[[package]] -name = "zipp" -version = "3.21.0" -description = "Backport of pathlib-compatible object wrapper for zip files" -optional = false -python-versions = ">=3.9" -files = [ - {file = "zipp-3.21.0-py3-none-any.whl", hash = "sha256:ac1bbe05fd2991f160ebce24ffbac5f6d11d83dc90891255885223d42b3cd931"}, - {file = "zipp-3.21.0.tar.gz", hash = "sha256:2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4"}, -] - -[package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] -cover = ["pytest-cov"] -doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -enabler = ["pytest-enabler (>=2.2)"] -test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] -type = ["pytest-mypy"] - [metadata] lock-version = "2.0" python-versions = ">=3.11,<3.13" -content-hash = "e9b3879a83d655cce5d65b0e3897bd15b4f6e3c85c1a03954430150fbbcb9c51" +content-hash = "3dd87314ea88fc4ce17abbfcb1a3f6fe8384e859db8edfb489a4b089ca8d2565" From 39dd937b31213538ae1453b89aaa641b6f0e51de Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Fri, 29 Nov 2024 12:28:56 +0000 Subject: [PATCH 14/34] =?UTF-8?q?=E3=83=A2=E3=83=87=E3=83=AB=E5=88=87?= =?UTF-8?q?=E3=82=8A=E6=9B=BF=E3=81=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/SwitchBedrockModel.tsx | 3 ++- .../src/features/knowledgeBase/pages/BotKbEditPage.tsx | 1 - frontend/src/hooks/useModel.ts | 10 ++++++---- frontend/src/pages/ChatPage.tsx | 3 ++- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/SwitchBedrockModel.tsx b/frontend/src/components/SwitchBedrockModel.tsx index 3030df7d7..276a8e4e6 100644 --- a/frontend/src/components/SwitchBedrockModel.tsx +++ b/frontend/src/components/SwitchBedrockModel.tsx @@ -5,6 +5,7 @@ import { Fragment } from 'react/jsx-runtime'; import { useMemo } from 'react'; import { PiCaretDown, PiCheck } from 'react-icons/pi'; import { ModelActivate } from '../@types/bot'; +import { toCamelCase } from '../utils/StringUtils'; interface Props extends BaseProps { modelActivate: ModelActivate; @@ -17,7 +18,7 @@ const SwitchBedrockModel: React.FC = (props) => { const availableModels = useMemo(() => { return allModels.filter(model => { if (props.modelActivate) { - return props.modelActivate[model.modelId] === true; + return props.modelActivate[toCamelCase(model.modelId)] === true; } return true; }); diff --git a/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx b/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx index fe777d813..4739623d8 100644 --- a/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx +++ b/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx @@ -144,7 +144,6 @@ const BotKbEditPage: React.FC = () => { acc[toCamelCase(key)] = true; return acc; }, {} as ModelActivate); - console.log("Initial modelActivate:", initialState); return initialState; }); diff --git a/frontend/src/hooks/useModel.ts b/frontend/src/hooks/useModel.ts index 799426754..b10df9a70 100644 --- a/frontend/src/hooks/useModel.ts +++ b/frontend/src/hooks/useModel.ts @@ -149,7 +149,7 @@ const useModel = (botId?: string | null, modelActivate?: ModelActivate) => { setFilteredModels(availableModels) } else if (processedModelActivate) { const filtered = availableModels.filter(model => { - const key = model.modelId as keyof ModelActivate; + const key = toCamelCase(model.modelId) as keyof ModelActivate; return processedModelActivate[key] !== false; }); setFilteredModels(filtered); @@ -168,7 +168,7 @@ const useModel = (botId?: string | null, modelActivate?: ModelActivate) => { // select the model via list of modelActivate const selectModel = useCallback((targetModelId: Model) => { - const modelExists = filteredModels.some(m => m.modelId === targetModelId); + const modelExists = filteredModels.some(m => toCamelCase(m.modelId) === toCamelCase(targetModelId)); return modelExists ? targetModelId : getDefaultModel(); }, [filteredModels, getDefaultModel]); @@ -207,16 +207,18 @@ const useModel = (botId?: string | null, modelActivate?: ModelActivate) => { }else{ // Processing when botId and previousBotID are the same, but there is an update in FilteredModels if (botId) { - const lastModelAvailable = filteredModels.some(m => m.modelId === recentUseModelId || m.modelId === botModelId ); + const lastModelAvailable = filteredModels.some(m => toCamelCase(m.modelId) === toCamelCase(recentUseModelId) || toCamelCase(m.modelId) === toCamelCase(botModelId) ); if (!lastModelAvailable) { setModelId(selectModel(getDefaultModel())); + }else{ + setModelId(selectModel(recentUseModelId as Model)); } } } }, [botId, previousBotId, botModelId, recentUseModelId, modelId, filteredModels, setModelId, selectModel, getDefaultModel, processedModelActivate]); const model = useMemo(() => { - return filteredModels.find((model) => model.modelId === modelId); + return filteredModels.find((model) => toCamelCase(model.modelId) === toCamelCase(modelId)); }, [filteredModels, modelId]); return { diff --git a/frontend/src/pages/ChatPage.tsx b/frontend/src/pages/ChatPage.tsx index 3a579169c..ed0f22ec6 100644 --- a/frontend/src/pages/ChatPage.tsx +++ b/frontend/src/pages/ChatPage.tsx @@ -32,6 +32,7 @@ import PopoverItem from '../components/PopoverItem'; import { ModelActivate } from '../@types/bot'; import { copyBotUrl } from '../utils/BotUtils'; +import { toCamelCase } from '../utils/StringUtils' import { produce } from 'immer'; import ButtonIcon from '../components/ButtonIcon'; import StatusSyncBot from '../components/StatusSyncBot'; @@ -57,7 +58,7 @@ const MISTRAL_ENABLED: boolean = // Default model activation settings when no bot is selected const defaultModelActivate: ModelActivate = (() => { return Object.fromEntries( - MODEL_KEYS.map(key => [key, true]) + MODEL_KEYS.map(key => [toCamelCase(key), true]) ) as ModelActivate; })(); From 64ef57305966ab28d2566bde1d5fb81868677d25 Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Thu, 5 Dec 2024 07:05:40 +0000 Subject: [PATCH 15/34] amazon nova support --- frontend/src/constants/index.ts | 5 ++++- .../features/knowledgeBase/pages/BotKbEditPage.tsx | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/frontend/src/constants/index.ts b/frontend/src/constants/index.ts index e3049130e..86b9e8384 100644 --- a/frontend/src/constants/index.ts +++ b/frontend/src/constants/index.ts @@ -113,5 +113,8 @@ export const MODEL_KEYS: Model[] = [ 'claude-v3.5-haiku', 'mistral-7b-instruct', 'mixtral-8x7b-instruct', - 'mistral-large' + 'mistral-large', + "amazon-nova-pro", + "amazon-nova-lite", + "amazon-nova-micro", ]; \ No newline at end of file diff --git a/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx b/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx index 4739623d8..2d5d02fa0 100644 --- a/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx +++ b/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx @@ -192,6 +192,18 @@ const BotKbEditPage: React.FC = () => { { key: 'claude-v3.5-haiku', label: t('model.haiku3-5.label') + }, + { + key: 'amazon-nova-pro', + label: t('model.novaPro.label'), + }, + { + key: 'amazon-nova-lite', + label: t('model.novaLite.label'), + }, + { + key: 'amazon-nova-micro', + label: t('model.novaMicro.label'), } ] })(); From 1320b447972a561820357b2b419ace5f26af6b63 Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Thu, 5 Dec 2024 07:08:43 +0000 Subject: [PATCH 16/34] =?UTF-8?q?CI=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/usecases/chat.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/backend/app/usecases/chat.py b/backend/app/usecases/chat.py index 8942536c8..745d66981 100644 --- a/backend/app/usecases/chat.py +++ b/backend/app/usecases/chat.py @@ -631,5 +631,3 @@ def fetch_conversation(user_id: str, conversation_id: str) -> Conversation: should_continue=conversation.should_continue, ) return output - - From abfa6608f48521e348c1c211bba938597f46a3a3 Mon Sep 17 00:00:00 2001 From: statefb Date: Thu, 5 Dec 2024 17:28:13 +0900 Subject: [PATCH 17/34] refactor: update ModelActivate type to use Model keys --- frontend/src/@types/bot.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/@types/bot.d.ts b/frontend/src/@types/bot.d.ts index 1a0ab0b6b..c0405967f 100644 --- a/frontend/src/@types/bot.d.ts +++ b/frontend/src/@types/bot.d.ts @@ -1,8 +1,9 @@ import { BedrockKnowledgeBase } from '../features/knowledgeBase/types'; +import { Model } from './conversation'; export type BotKind = 'private' | 'mixed'; type ModelActivate = { - [key: string]: boolean; + [K in Model]: boolean; }; export type BotMeta = { From b1a44ee8205a1f4ab11de59b2c05541ddd8b629d Mon Sep 17 00:00:00 2001 From: statefb Date: Thu, 5 Dec 2024 17:39:54 +0900 Subject: [PATCH 18/34] refactor: rename model activation functions for clarity and streamline bot storage logic --- backend/app/repositories/custom_bot.py | 5 +--- backend/app/repositories/models/custom_bot.py | 9 +++---- backend/app/routes/schemas/bot.py | 24 +++++-------------- .../test_repositories/test_conversation.py | 7 +++--- 4 files changed, 16 insertions(+), 29 deletions(-) diff --git a/backend/app/repositories/custom_bot.py b/backend/app/repositories/custom_bot.py index bb034eb6e..b97e11231 100644 --- a/backend/app/repositories/custom_bot.py +++ b/backend/app/repositories/custom_bot.py @@ -90,8 +90,6 @@ def store_bot(user_id: str, custom_bot: BotModel): starter.model_dump() for starter in custom_bot.conversation_quick_starters ], } - if custom_bot.model_activate is not None: - item["ModelActivate"] = custom_bot.model_activate.model_dump() if custom_bot.bedrock_knowledge_base: item["BedrockKnowledgeBase"] = custom_bot.bedrock_knowledge_base.model_dump() if custom_bot.bedrock_guardrails: @@ -203,9 +201,8 @@ def store_alias(user_id: str, alias: BotAliasModel): "ConversationQuickStarters": [ starter.model_dump() for starter in alias.conversation_quick_starters ], + "ModelActivate": alias.model_activate.model_dump(), } - if alias.model_activate is not None: - item["ModelActivate"] = alias.model_activate.model_dump() response = table.put_item(Item=item) return response diff --git a/backend/app/repositories/models/custom_bot.py b/backend/app/repositories/models/custom_bot.py index 49262556d..2141c07b4 100644 --- a/backend/app/repositories/models/custom_bot.py +++ b/backend/app/repositories/models/custom_bot.py @@ -1,24 +1,25 @@ -from typing import get_args, Dict, Any, List, Type +from typing import Any, Dict, List, Type, get_args + from app.repositories.models.common import Float from app.repositories.models.custom_bot_guardrails import BedrockGuardrailsModel from app.repositories.models.custom_bot_kb import BedrockKnowledgeBaseModel from app.routes.schemas.bot import type_sync_status -from pydantic import BaseModel, ConfigDict, create_model from app.routes.schemas.conversation import type_model_name +from pydantic import BaseModel, ConfigDict, create_model class DynamicBaseModel(BaseModel): model_config = ConfigDict(extra="allow") -def create_model_activate_model(model_names: List[str]) -> Type[DynamicBaseModel]: +def _create_model_activate_model(model_names: List[str]) -> Type[DynamicBaseModel]: fields: Dict[str, Any] = { name.replace("-", "_").replace(".", "_"): (bool, False) for name in model_names } return create_model("ModelActivateModel", __base__=DynamicBaseModel, **fields) -ModelActivateModel: Type[BaseModel] = create_model_activate_model( +ModelActivateModel: Type[BaseModel] = _create_model_activate_model( list(get_args(type_model_name)) ) diff --git a/backend/app/routes/schemas/bot.py b/backend/app/routes/schemas/bot.py index 7db414bc2..addb517e0 100644 --- a/backend/app/routes/schemas/bot.py +++ b/backend/app/routes/schemas/bot.py @@ -1,30 +1,18 @@ from __future__ import annotations -from typing import ( - TYPE_CHECKING, - Literal, - Optional, - List, - Dict, - Type, - get_args, - Any, -) -from pydantic import ( - Field, - validator, - create_model, -) +from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, Type, get_args + from app.routes.schemas.base import BaseSchema from app.routes.schemas.bot_guardrails import ( BedrockGuardrailsInput, BedrockGuardrailsOutput, ) -from app.routes.schemas.conversation import type_model_name from app.routes.schemas.bot_kb import ( BedrockKnowledgeBaseInput, BedrockKnowledgeBaseOutput, ) +from app.routes.schemas.conversation import type_model_name +from pydantic import Field, create_model, validator if TYPE_CHECKING: from app.repositories.models.custom_bot import BotModel @@ -41,14 +29,14 @@ ] -def create_model_activate_input(model_names: List[str]) -> Type[BaseSchema]: +def _create_model_activate_input(model_names: List[str]) -> Type[BaseSchema]: fields: Dict[str, Any] = { name.replace("-", "_").replace(".", "_"): (bool, True) for name in model_names } return create_model("ModelActivateInput", **fields, __base__=BaseSchema) -ModelActivateInput = create_model_activate_input(list(get_args(type_model_name))) +ModelActivateInput = _create_model_activate_input(list(get_args(type_model_name))) def create_model_activate_output(model_names: List[str]) -> Type[BaseSchema]: diff --git a/backend/tests/test_repositories/test_conversation.py b/backend/tests/test_repositories/test_conversation.py index ae8c261b9..f8cf1079b 100644 --- a/backend/tests/test_repositories/test_conversation.py +++ b/backend/tests/test_repositories/test_conversation.py @@ -1,7 +1,7 @@ +import base64 import json import os import sys -import base64 import unittest from unittest.mock import MagicMock, patch @@ -26,11 +26,11 @@ store_bot, ) from app.repositories.models.conversation import ( - SimpleMessageModel, ChunkModel, FeedbackModel, - TextContentModel, ImageContentModel, + SimpleMessageModel, + TextContentModel, ToolUseContentModel, ToolUseContentModelBody, ) @@ -41,6 +41,7 @@ ConversationQuickStarterModel, GenerationParamsModel, KnowledgeModel, + ModelActivateModel, ) from boto3.dynamodb.conditions import Key from botocore.exceptions import ClientError From 7c4d12bd83f69a906b3b32f178a5fbdefa0e7bba Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Thu, 5 Dec 2024 12:23:42 +0000 Subject: [PATCH 19/34] fix the comment --- backend/app/repositories/custom_bot.py | 12 +++---- backend/app/repositories/models/common.py | 20 ++++++++++- .../app/repositories/models/conversation.py | 16 +++++---- backend/app/repositories/models/custom_bot.py | 19 ++-------- backend/app/routes/bot.py | 2 +- backend/app/routes/schemas/conversation.py | 15 ++++---- backend/app/usecases/bot.py | 36 +++++++++++++------ 7 files changed, 71 insertions(+), 49 deletions(-) diff --git a/backend/app/repositories/custom_bot.py b/backend/app/repositories/custom_bot.py index bb034eb6e..f77b75a2f 100644 --- a/backend/app/repositories/custom_bot.py +++ b/backend/app/repositories/custom_bot.py @@ -20,6 +20,7 @@ decompose_bot_alias_id, decompose_bot_id, ) +from app.repositories.models.common import ModelActivateModel from app.repositories.models.custom_bot import ( AgentModel, BotAliasModel, @@ -29,7 +30,6 @@ ConversationQuickStarterModel, GenerationParamsModel, KnowledgeModel, - ModelActivateModel, ) from app.repositories.models.custom_bot_guardrails import BedrockGuardrailsModel from app.repositories.models.custom_bot_kb import BedrockKnowledgeBaseModel @@ -134,7 +134,8 @@ def update_bot( "SyncStatusReason = :sync_status_reason, " "GenerationParams = :generation_params, " "DisplayRetrievedChunks = :display_retrieved_chunks, " - "ConversationQuickStarters = :conversation_quick_starters" + "ConversationQuickStarters = :conversation_quick_starters, " + "ModelActivate = :model_activate" ) expression_attribute_values = { @@ -150,6 +151,7 @@ def update_bot( ":conversation_quick_starters": [ starter.model_dump() for starter in conversation_quick_starters ], + ":model_activate": model_activate.model_dump(), # type: ignore[attr-defined] } if bedrock_knowledge_base: update_expression += ", BedrockKnowledgeBase = :bedrock_knowledge_base" @@ -163,10 +165,6 @@ def update_bot( bedrock_guardrails.model_dump() ) - if model_activate: - update_expression += ", ModelActivate = :model_activate" - expression_attribute_values[":model_activate"] = model_activate.model_dump() # type: ignore[attr-defined] - try: response = table.update_item( Key={"PK": user_id, "SK": compose_bot_id(user_id, bot_id)}, @@ -494,7 +492,7 @@ def find_private_bot_by_id(user_id: str, bot_id: str) -> BotModel: if "GuardrailsParams" in item else None ), - model_activate=ModelActivateModel.model_validate(item.get("ModelActivate")), + model_activate=ModelActivateModel.model_validate(item.get("ModelActivate", {})), ) logger.info(f"Found bot: {bot}") diff --git a/backend/app/repositories/models/common.py b/backend/app/repositories/models/common.py index 7e5f3bd4d..d778ca2e3 100644 --- a/backend/app/repositories/models/common.py +++ b/backend/app/repositories/models/common.py @@ -1,9 +1,11 @@ import base64 from decimal import Decimal - +from typing import get_args, Dict, Any, List, Type +from pydantic import BaseModel, ConfigDict, create_model from pydantic.functional_serializers import PlainSerializer from pydantic.functional_validators import PlainValidator from typing import Annotated, Any +from app.routes.schemas.conversation import type_model_name # Declare customized float type Float = Annotated[ @@ -35,3 +37,19 @@ def decode_base64_string(value: Any) -> bytes: return_type=str, ), ] + + +class DynamicBaseModel(BaseModel): + model_config = ConfigDict(extra="allow") + + +def create_model_activate_model(model_names: List[str]) -> Type[DynamicBaseModel]: + fields: Dict[str, Any] = { + name.replace("-", "_").replace(".", "_"): (bool, True) for name in model_names + } + return create_model("ModelActivateModel", __base__=DynamicBaseModel, **fields) + + +ModelActivateModel: Type[BaseModel] = create_model_activate_model( + list(get_args(type_model_name)) +) diff --git a/backend/app/repositories/models/conversation.py b/backend/app/repositories/models/conversation.py index 2779e40da..0a3ce859e 100644 --- a/backend/app/repositories/models/conversation.py +++ b/backend/app/repositories/models/conversation.py @@ -1,11 +1,9 @@ from __future__ import annotations -from typing import Literal, Any, Annotated, Self, TypedDict, TypeGuard +from typing import Literal, Any, Annotated, Self, TypedDict, TypeGuard, TYPE_CHECKING from pathlib import Path import re from urllib.parse import urlparse - -from app.repositories.models.common import Base64EncodedBytes from app.routes.schemas.conversation import ( SimpleMessage, MessageInput, @@ -40,6 +38,10 @@ ImageFormatType, ) +# To avoid circular imports errors +if TYPE_CHECKING: + from app.repositories.models.common import Base64EncodedBytes + class TextContentModel(BaseModel): content_type: Literal["text"] @@ -76,7 +78,7 @@ def _is_converse_supported_image_format(format: str) -> TypeGuard[ImageFormatTyp class ImageContentModel(BaseModel): content_type: Literal["image"] media_type: str - body: Base64EncodedBytes = Field( + body: "Base64EncodedBytes" = Field( ..., description="Image bytes.", ) @@ -142,7 +144,7 @@ def _convert_to_valid_file_name(file_name: str) -> str: class AttachmentContentModel(BaseModel): content_type: Literal["attachment"] - body: Base64EncodedBytes = Field( + body: "Base64EncodedBytes" = Field( ..., description="Attachment file bytes.", ) @@ -305,7 +307,7 @@ def to_content_for_converse(self) -> ToolResultContentBlockOutputTypeDef: class ImageToolResultModel(BaseModel): format: ImageFormatType - image: Base64EncodedBytes + image: "Base64EncodedBytes" @classmethod def from_image_tool_result(cls, tool_result: ImageToolResult) -> Self: @@ -334,7 +336,7 @@ def to_content_for_converse(self) -> ToolResultContentBlockOutputTypeDef: class DocumentToolResultModel(BaseModel): format: DocumentFormatType name: str - document: Base64EncodedBytes + document: "Base64EncodedBytes" @classmethod def from_document_tool_result(cls, tool_result: DocumentToolResult) -> Self: diff --git a/backend/app/repositories/models/custom_bot.py b/backend/app/repositories/models/custom_bot.py index 49262556d..cb650587f 100644 --- a/backend/app/repositories/models/custom_bot.py +++ b/backend/app/repositories/models/custom_bot.py @@ -3,24 +3,9 @@ from app.repositories.models.custom_bot_guardrails import BedrockGuardrailsModel from app.repositories.models.custom_bot_kb import BedrockKnowledgeBaseModel from app.routes.schemas.bot import type_sync_status -from pydantic import BaseModel, ConfigDict, create_model +from pydantic import BaseModel, ConfigDict from app.routes.schemas.conversation import type_model_name - - -class DynamicBaseModel(BaseModel): - model_config = ConfigDict(extra="allow") - - -def create_model_activate_model(model_names: List[str]) -> Type[DynamicBaseModel]: - fields: Dict[str, Any] = { - name.replace("-", "_").replace(".", "_"): (bool, False) for name in model_names - } - return create_model("ModelActivateModel", __base__=DynamicBaseModel, **fields) - - -ModelActivateModel: Type[BaseModel] = create_model_activate_model( - list(get_args(type_model_name)) -) +from app.repositories.models.common import ModelActivateModel class KnowledgeModel(BaseModel): diff --git a/backend/app/routes/bot.py b/backend/app/routes/bot.py index 506025920..893d25a56 100644 --- a/backend/app/routes/bot.py +++ b/backend/app/routes/bot.py @@ -154,7 +154,7 @@ def get_private_bot(request: Request, bot_id: str): if bot.bedrock_guardrails else None ), - model_activate=ModelActivateOutput(**dict(bot.model_activate)), + model_activate=ModelActivateOutput.model_validate(dict(bot.model_activate)), ) return output diff --git a/backend/app/routes/schemas/conversation.py b/backend/app/routes/schemas/conversation.py index 552c1755e..ebeec7eaa 100644 --- a/backend/app/routes/schemas/conversation.py +++ b/backend/app/routes/schemas/conversation.py @@ -1,7 +1,6 @@ -from typing import Literal, Annotated +from typing import Literal, Annotated, TYPE_CHECKING from app.routes.schemas.base import BaseSchema -from app.repositories.models.common import Base64EncodedBytes from pydantic import Field, Discriminator, JsonValue, root_validator from mypy_boto3_bedrock_runtime.literals import ( @@ -9,6 +8,10 @@ ImageFormatType, ) +# To avoid circular imports errors +if TYPE_CHECKING: + from app.repositories.models.common import Base64EncodedBytes + type_model_name = Literal[ "claude-instant-v1", "claude-v2", @@ -43,7 +46,7 @@ class ImageContent(BaseSchema): ..., description="MIME type of the image. Must be specified if `content_type` is `image`.", ) - body: Base64EncodedBytes = Field(..., description="Content body.") + body: "Base64EncodedBytes" = Field(..., description="Content body.") class AttachmentContent(BaseSchema): @@ -54,7 +57,7 @@ class AttachmentContent(BaseSchema): ..., description="File name of the attachment. Must be specified if `content_type` is `attachment`.", ) - body: Base64EncodedBytes = Field(..., description="Content body.") + body: "Base64EncodedBytes" = Field(..., description="Content body.") class FeedbackInput(BaseSchema): @@ -113,13 +116,13 @@ class JsonToolResult(BaseSchema): class ImageToolResult(BaseSchema): format: ImageFormatType - image: Base64EncodedBytes + image: "Base64EncodedBytes" class DocumentToolResult(BaseSchema): format: DocumentFormatType name: str - document: Base64EncodedBytes + document: "Base64EncodedBytes" ToolResult = TextToolResult | JsonToolResult | ImageToolResult | DocumentToolResult diff --git a/backend/app/usecases/bot.py b/backend/app/usecases/bot.py index edb85ed60..6bc0eead3 100644 --- a/backend/app/usecases/bot.py +++ b/backend/app/usecases/bot.py @@ -27,6 +27,9 @@ update_bot_last_used_time, update_bot_pin_status, ) +from app.repositories.models.common import ( + ModelActivateModel, +) from app.repositories.models.custom_bot import ( AgentModel, AgentToolModel, @@ -36,7 +39,6 @@ ConversationQuickStarterModel, GenerationParamsModel, KnowledgeModel, - ModelActivateModel, ) from app.repositories.models.custom_bot_guardrails import BedrockGuardrailsModel from app.repositories.models.custom_bot_kb import BedrockKnowledgeBaseModel @@ -213,7 +215,9 @@ def create_new_bot(user_id: str, bot_input: BotInput) -> BotOutput: if bot_input.bedrock_guardrails else None ), - model_activate=ModelActivateModel(**dict(bot_input.model_activate)), + model_activate=ModelActivateModel.model_validate( + dict(bot_input.model_activate) + ), ), ) return BotOutput( @@ -266,7 +270,9 @@ def create_new_bot(user_id: str, bot_input: BotInput) -> BotOutput: if bot_input.bedrock_guardrails else None ), - model_activate=ModelActivateOutput(**dict(bot_input.model_activate)), + model_activate=ModelActivateOutput.model_validate( + dict(bot_input.model_activate) + ), ) @@ -379,7 +385,9 @@ def modify_owned_bot( if modify_input.bedrock_guardrails else None ), - model_activate=ModelActivateOutput(**dict(modify_input.model_activate)), + model_activate=ModelActivateOutput.model_validate( + dict(modify_input.model_activate) + ), ) return BotModifyOutput( @@ -423,7 +431,9 @@ def modify_owned_bot( if modify_input.bedrock_guardrails else None ), - model_activate=ModelActivateOutput(**dict(modify_input.model_activate)), + model_activate=ModelActivateOutput.model_validate( + dict(modify_input.model_activate) + ), ) @@ -543,7 +553,9 @@ def fetch_all_bots_by_user_id( has_knowledge=bot.has_knowledge(), has_agent=bot.is_agent_enabled(), conversation_quick_starters=bot.conversation_quick_starters, - model_activate=ModelActivateModel(**dict(bot.model_activate)), + model_activate=ModelActivateModel.model_validate( + dict(bot.model_activate) + ), ), ) @@ -640,7 +652,7 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: ) for starter in bot.conversation_quick_starters ], - model_activate=ModelActivateOutput(**dict(bot.model_activate)), + model_activate=ModelActivateOutput.model_validate(dict(bot.model_activate)), ) except RecordNotFoundError: @@ -675,7 +687,9 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: for starter in alias.conversation_quick_starters ] ), - model_activate=ModelActivateOutput(**dict(alias.model_activate)), + model_activate=ModelActivateOutput.model_validate( + dict(alias.model_activate) + ), ) except RecordNotFoundError: pass @@ -705,7 +719,9 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: ) for starter in bot.conversation_quick_starters ], - model_activate=ModelActivateOutput(**dict(bot.model_activate)), + model_activate=ModelActivateOutput.model_validate( + dict(bot.model_activate) + ), ), ) return BotSummaryOutput( @@ -727,7 +743,7 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: ) for starter in bot.conversation_quick_starters ], - model_activate=ModelActivateOutput(**dict(bot.model_activate)), + model_activate=ModelActivateOutput.model_validate(dict(bot.model_activate)), ) except RecordNotFoundError: raise RecordNotFoundError( From aeffcd491441ea248395bd3f9686a219d26e5e10 Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Thu, 5 Dec 2024 12:30:38 +0000 Subject: [PATCH 20/34] revert --- backend/app/repositories/custom_bot.py | 2 +- backend/app/repositories/models/common.py | 13 +------------ backend/app/repositories/models/custom_bot.py | 13 +++++++++++-- backend/app/usecases/bot.py | 4 +--- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/backend/app/repositories/custom_bot.py b/backend/app/repositories/custom_bot.py index a119924b9..d80f0cad9 100644 --- a/backend/app/repositories/custom_bot.py +++ b/backend/app/repositories/custom_bot.py @@ -20,7 +20,6 @@ decompose_bot_alias_id, decompose_bot_id, ) -from app.repositories.models.common import ModelActivateModel from app.repositories.models.custom_bot import ( AgentModel, BotAliasModel, @@ -30,6 +29,7 @@ ConversationQuickStarterModel, GenerationParamsModel, KnowledgeModel, + ModelActivateModel, ) from app.repositories.models.custom_bot_guardrails import BedrockGuardrailsModel from app.repositories.models.custom_bot_kb import BedrockKnowledgeBaseModel diff --git a/backend/app/repositories/models/common.py b/backend/app/repositories/models/common.py index d778ca2e3..e4708bb61 100644 --- a/backend/app/repositories/models/common.py +++ b/backend/app/repositories/models/common.py @@ -1,7 +1,7 @@ import base64 from decimal import Decimal from typing import get_args, Dict, Any, List, Type -from pydantic import BaseModel, ConfigDict, create_model +from pydantic import BaseModel, ConfigDict from pydantic.functional_serializers import PlainSerializer from pydantic.functional_validators import PlainValidator from typing import Annotated, Any @@ -42,14 +42,3 @@ def decode_base64_string(value: Any) -> bytes: class DynamicBaseModel(BaseModel): model_config = ConfigDict(extra="allow") - -def create_model_activate_model(model_names: List[str]) -> Type[DynamicBaseModel]: - fields: Dict[str, Any] = { - name.replace("-", "_").replace(".", "_"): (bool, True) for name in model_names - } - return create_model("ModelActivateModel", __base__=DynamicBaseModel, **fields) - - -ModelActivateModel: Type[BaseModel] = create_model_activate_model( - list(get_args(type_model_name)) -) diff --git a/backend/app/repositories/models/custom_bot.py b/backend/app/repositories/models/custom_bot.py index 937ac747f..bec51f8cf 100644 --- a/backend/app/repositories/models/custom_bot.py +++ b/backend/app/repositories/models/custom_bot.py @@ -4,10 +4,19 @@ from app.repositories.models.custom_bot_guardrails import BedrockGuardrailsModel from app.repositories.models.custom_bot_kb import BedrockKnowledgeBaseModel from app.routes.schemas.bot import type_sync_status -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, create_model from app.routes.schemas.conversation import type_model_name -from app.repositories.models.common import ModelActivateModel +from app.repositories.models.common import DynamicBaseModel +def _create_model_activate_model(model_names: List[str]) -> Type[DynamicBaseModel]: + fields: Dict[str, Any] = { + name.replace("-", "_").replace(".", "_"): (bool, True) for name in model_names + } + return create_model("ModelActivateModel", __base__=DynamicBaseModel, **fields) + +ModelActivateModel: Type[BaseModel] = _create_model_activate_model( + list(get_args(type_model_name)) +) class KnowledgeModel(BaseModel): source_urls: list[str] diff --git a/backend/app/usecases/bot.py b/backend/app/usecases/bot.py index 6bc0eead3..266066fc6 100644 --- a/backend/app/usecases/bot.py +++ b/backend/app/usecases/bot.py @@ -27,9 +27,6 @@ update_bot_last_used_time, update_bot_pin_status, ) -from app.repositories.models.common import ( - ModelActivateModel, -) from app.repositories.models.custom_bot import ( AgentModel, AgentToolModel, @@ -39,6 +36,7 @@ ConversationQuickStarterModel, GenerationParamsModel, KnowledgeModel, + ModelActivateModel, ) from app.repositories.models.custom_bot_guardrails import BedrockGuardrailsModel from app.repositories.models.custom_bot_kb import BedrockKnowledgeBaseModel From a9b27af9f310573b2650f5a461005f6e58d804a3 Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Thu, 5 Dec 2024 12:39:14 +0000 Subject: [PATCH 21/34] =?UTF-8?q?=E3=83=81=E3=83=A3=E3=83=83=E3=83=88?= =?UTF-8?q?=E3=83=9C=E3=83=83=E3=83=88=E6=96=B0=E8=A6=8F=E4=BD=9C=E6=88=90?= =?UTF-8?q?=E6=99=82=E3=81=AB=E3=83=A2=E3=83=87=E3=83=AB=E6=9C=89=E5=8A=B9?= =?UTF-8?q?=E5=8C=96=E3=81=AE=E8=A8=AD=E5=AE=9A=E3=81=8C=E5=8B=95=E4=BD=9C?= =?UTF-8?q?=E3=81=97=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/repositories/custom_bot.py | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/app/repositories/custom_bot.py b/backend/app/repositories/custom_bot.py index d80f0cad9..c69377419 100644 --- a/backend/app/repositories/custom_bot.py +++ b/backend/app/repositories/custom_bot.py @@ -89,6 +89,7 @@ def store_bot(user_id: str, custom_bot: BotModel): "ConversationQuickStarters": [ starter.model_dump() for starter in custom_bot.conversation_quick_starters ], + "ModelActivate": custom_bot.model_activate.model_dump(), # type: ignore[attr-defined] } if custom_bot.bedrock_knowledge_base: item["BedrockKnowledgeBase"] = custom_bot.bedrock_knowledge_base.model_dump() From b0f4fc2a9f0f99bbbe289d227017b06a9aaf0ef1 Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Thu, 5 Dec 2024 12:50:36 +0000 Subject: [PATCH 22/34] =?UTF-8?q?CI=E3=82=A8=E3=83=A9=E3=83=BC=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/repositories/custom_bot.py | 2 +- backend/app/repositories/models/common.py | 1 - backend/app/repositories/models/conversation.py | 13 +++++-------- backend/app/repositories/models/custom_bot.py | 3 +++ 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/backend/app/repositories/custom_bot.py b/backend/app/repositories/custom_bot.py index c69377419..4d7defc07 100644 --- a/backend/app/repositories/custom_bot.py +++ b/backend/app/repositories/custom_bot.py @@ -200,7 +200,7 @@ def store_alias(user_id: str, alias: BotAliasModel): "ConversationQuickStarters": [ starter.model_dump() for starter in alias.conversation_quick_starters ], - "ModelActivate": alias.model_activate.model_dump(), + "ModelActivate": alias.model_activate.model_dump(), # type: ignore[attr-defined] } response = table.put_item(Item=item) diff --git a/backend/app/repositories/models/common.py b/backend/app/repositories/models/common.py index e4708bb61..6c2023fb1 100644 --- a/backend/app/repositories/models/common.py +++ b/backend/app/repositories/models/common.py @@ -41,4 +41,3 @@ def decode_base64_string(value: Any) -> bytes: class DynamicBaseModel(BaseModel): model_config = ConfigDict(extra="allow") - diff --git a/backend/app/repositories/models/conversation.py b/backend/app/repositories/models/conversation.py index 0a3ce859e..72e2e4194 100644 --- a/backend/app/repositories/models/conversation.py +++ b/backend/app/repositories/models/conversation.py @@ -37,10 +37,7 @@ DocumentFormatType, ImageFormatType, ) - -# To avoid circular imports errors -if TYPE_CHECKING: - from app.repositories.models.common import Base64EncodedBytes +from app.repositories.models.common import Base64EncodedBytes class TextContentModel(BaseModel): @@ -78,7 +75,7 @@ def _is_converse_supported_image_format(format: str) -> TypeGuard[ImageFormatTyp class ImageContentModel(BaseModel): content_type: Literal["image"] media_type: str - body: "Base64EncodedBytes" = Field( + body: Base64EncodedBytes = Field( ..., description="Image bytes.", ) @@ -144,7 +141,7 @@ def _convert_to_valid_file_name(file_name: str) -> str: class AttachmentContentModel(BaseModel): content_type: Literal["attachment"] - body: "Base64EncodedBytes" = Field( + body: Base64EncodedBytes = Field( ..., description="Attachment file bytes.", ) @@ -307,7 +304,7 @@ def to_content_for_converse(self) -> ToolResultContentBlockOutputTypeDef: class ImageToolResultModel(BaseModel): format: ImageFormatType - image: "Base64EncodedBytes" + image: Base64EncodedBytes @classmethod def from_image_tool_result(cls, tool_result: ImageToolResult) -> Self: @@ -336,7 +333,7 @@ def to_content_for_converse(self) -> ToolResultContentBlockOutputTypeDef: class DocumentToolResultModel(BaseModel): format: DocumentFormatType name: str - document: "Base64EncodedBytes" + document: Base64EncodedBytes @classmethod def from_document_tool_result(cls, tool_result: DocumentToolResult) -> Self: diff --git a/backend/app/repositories/models/custom_bot.py b/backend/app/repositories/models/custom_bot.py index bec51f8cf..19e9e9da1 100644 --- a/backend/app/repositories/models/custom_bot.py +++ b/backend/app/repositories/models/custom_bot.py @@ -8,16 +8,19 @@ from app.routes.schemas.conversation import type_model_name from app.repositories.models.common import DynamicBaseModel + def _create_model_activate_model(model_names: List[str]) -> Type[DynamicBaseModel]: fields: Dict[str, Any] = { name.replace("-", "_").replace(".", "_"): (bool, True) for name in model_names } return create_model("ModelActivateModel", __base__=DynamicBaseModel, **fields) + ModelActivateModel: Type[BaseModel] = _create_model_activate_model( list(get_args(type_model_name)) ) + class KnowledgeModel(BaseModel): source_urls: list[str] sitemap_urls: list[str] From 6924626ce60a6e87bd7a28683b9b11a243357cd5 Mon Sep 17 00:00:00 2001 From: fsatsuki Date: Thu, 5 Dec 2024 13:12:13 +0000 Subject: [PATCH 23/34] fix CI error --- frontend/src/components/SwitchBedrockModel.tsx | 2 +- frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx | 4 ++-- frontend/src/hooks/useModel.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/SwitchBedrockModel.tsx b/frontend/src/components/SwitchBedrockModel.tsx index 276a8e4e6..577180eb1 100644 --- a/frontend/src/components/SwitchBedrockModel.tsx +++ b/frontend/src/components/SwitchBedrockModel.tsx @@ -18,7 +18,7 @@ const SwitchBedrockModel: React.FC = (props) => { const availableModels = useMemo(() => { return allModels.filter(model => { if (props.modelActivate) { - return props.modelActivate[toCamelCase(model.modelId)] === true; + return props.modelActivate[toCamelCase(model.modelId) as keyof ModelActivate] === true; } return true; }); diff --git a/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx b/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx index 2d5d02fa0..e550ee56b 100644 --- a/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx +++ b/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx @@ -141,7 +141,7 @@ const BotKbEditPage: React.FC = () => { const [modelActivate, setModelActivate] = useState(() => { const initialState = MODEL_KEYS.reduce((acc, key) => { - acc[toCamelCase(key)] = true; + acc[toCamelCase(key) as keyof ModelActivate] = true; return acc; }, {} as ModelActivate); return initialState; @@ -586,7 +586,7 @@ const BotKbEditPage: React.FC = () => { const onChangeModelActivate = useCallback( (key: string, value: boolean) => { setModelActivate((prevState) => { - const camelKey = toCamelCase(key); + const camelKey = toCamelCase(key) as keyof ModelActivate; const newState = { ...prevState }; newState[camelKey] = value; return newState; diff --git a/frontend/src/hooks/useModel.ts b/frontend/src/hooks/useModel.ts index 5b605a23d..c4977c20d 100644 --- a/frontend/src/hooks/useModel.ts +++ b/frontend/src/hooks/useModel.ts @@ -61,7 +61,7 @@ const useModel = (botId?: string | null, modelActivate?: ModelActivate) => { // Create a new object with all models set to true return MODEL_KEYS.reduce((acc, model) => { // Optimize string replacement by doing it in one operation - acc[toCamelCase(model)] = true; + acc[toCamelCase(model) as keyof ModelActivate ] = true; return acc; }, {} as ModelActivate); From 14be6a865f2a5727056ea7eb89b7131d73243570 Mon Sep 17 00:00:00 2001 From: statefb Date: Fri, 6 Dec 2024 11:41:18 +0900 Subject: [PATCH 24/34] Refactor model activation handling to use ActiveModels instead of ModelActivate across the application --- backend/app/repositories/custom_bot.py | 18 +- backend/app/repositories/models/common.py | 5 +- .../app/repositories/models/conversation.py | 45 +- backend/app/repositories/models/custom_bot.py | 15 +- backend/app/routes/bot.py | 6 +- backend/app/routes/schemas/bot.py | 18 +- backend/app/routes/schemas/conversation.py | 23 +- backend/app/usecases/bot.py | 40 +- backend/app/usecases/chat.py | 15 +- .../test_repositories/test_conversation.py | 8 +- .../test_repositories/test_custom_bot.py | 6 + .../test_repositories/utils/bot_factory.py | 3 + .../tests/test_usecases/utils/bot_factory.py | 4 + frontend/src/@types/bot.d.ts | 12 +- .../components/SwitchBedrockModel.stories.tsx | 15 +- .../src/components/SwitchBedrockModel.tsx | 27 +- .../knowledgeBase/pages/BotKbEditPage.tsx | 672 +++++++++++------- frontend/src/hooks/useModel.ts | 103 +-- frontend/src/i18n/en/index.ts | 26 +- frontend/src/i18n/ja/index.ts | 34 +- frontend/src/pages/ChatPage.tsx | 72 +- 21 files changed, 668 insertions(+), 499 deletions(-) diff --git a/backend/app/repositories/custom_bot.py b/backend/app/repositories/custom_bot.py index 4d7defc07..8909936b9 100644 --- a/backend/app/repositories/custom_bot.py +++ b/backend/app/repositories/custom_bot.py @@ -21,6 +21,7 @@ decompose_bot_id, ) from app.repositories.models.custom_bot import ( + ActiveModelsModel, AgentModel, BotAliasModel, BotMeta, @@ -29,7 +30,6 @@ ConversationQuickStarterModel, GenerationParamsModel, KnowledgeModel, - ModelActivateModel, ) from app.repositories.models.custom_bot_guardrails import BedrockGuardrailsModel from app.repositories.models.custom_bot_kb import BedrockKnowledgeBaseModel @@ -89,7 +89,7 @@ def store_bot(user_id: str, custom_bot: BotModel): "ConversationQuickStarters": [ starter.model_dump() for starter in custom_bot.conversation_quick_starters ], - "ModelActivate": custom_bot.model_activate.model_dump(), # type: ignore[attr-defined] + "ActiveModels": custom_bot.active_models.model_dump(), # type: ignore[attr-defined] } if custom_bot.bedrock_knowledge_base: item["BedrockKnowledgeBase"] = custom_bot.bedrock_knowledge_base.model_dump() @@ -112,7 +112,7 @@ def update_bot( sync_status: type_sync_status, sync_status_reason: str, display_retrieved_chunks: bool, - model_activate: ModelActivateModel, # type: ignore + active_models: ActiveModelsModel, # type: ignore conversation_quick_starters: list[ConversationQuickStarterModel], bedrock_knowledge_base: BedrockKnowledgeBaseModel | None = None, bedrock_guardrails: BedrockGuardrailsModel | None = None, @@ -134,7 +134,7 @@ def update_bot( "GenerationParams = :generation_params, " "DisplayRetrievedChunks = :display_retrieved_chunks, " "ConversationQuickStarters = :conversation_quick_starters, " - "ModelActivate = :model_activate" + "ActiveModels = :active_models" ) expression_attribute_values = { @@ -150,7 +150,7 @@ def update_bot( ":conversation_quick_starters": [ starter.model_dump() for starter in conversation_quick_starters ], - ":model_activate": model_activate.model_dump(), # type: ignore[attr-defined] + ":active_models": active_models.model_dump(), # type: ignore[attr-defined] } if bedrock_knowledge_base: update_expression += ", BedrockKnowledgeBase = :bedrock_knowledge_base" @@ -200,7 +200,7 @@ def store_alias(user_id: str, alias: BotAliasModel): "ConversationQuickStarters": [ starter.model_dump() for starter in alias.conversation_quick_starters ], - "ModelActivate": alias.model_activate.model_dump(), # type: ignore[attr-defined] + "ActiveModels": alias.active_models.model_dump(), # type: ignore[attr-defined] } response = table.put_item(Item=item) @@ -490,7 +490,7 @@ def find_private_bot_by_id(user_id: str, bot_id: str) -> BotModel: if "GuardrailsParams" in item else None ), - model_activate=ModelActivateModel.model_validate(item.get("ModelActivate", {})), + active_models=ActiveModelsModel.model_validate(item.get("ActiveModels", {})), ) logger.info(f"Found bot: {bot}") @@ -568,7 +568,7 @@ def find_public_bot_by_id(bot_id: str) -> BotModel: if "GuardrailsParams" in item else None ), - model_activate=ModelActivateModel.model_validate(item.get("ModelActivate")), + active_models=ActiveModelsModel.model_validate(item.get("ActiveModels")), ) logger.info(f"Found public bot: {bot}") return bot @@ -598,7 +598,7 @@ def find_alias_by_id(user_id: str, alias_id: str) -> BotAliasModel: has_knowledge=item["HasKnowledge"], has_agent=item.get("HasAgent", False), conversation_quick_starters=item.get("ConversationQuickStarters", []), - model_activate=ModelActivateModel.model_validate(item.get("ModelActivate")), + active_models=ActiveModelsModel.model_validate(item.get("ActiveModels")), ) logger.info(f"Found alias: {bot}") diff --git a/backend/app/repositories/models/common.py b/backend/app/repositories/models/common.py index 6c2023fb1..448f7dca5 100644 --- a/backend/app/repositories/models/common.py +++ b/backend/app/repositories/models/common.py @@ -1,11 +1,10 @@ import base64 from decimal import Decimal -from typing import get_args, Dict, Any, List, Type +from typing import Annotated, Any, Dict, List, Type, get_args + from pydantic import BaseModel, ConfigDict from pydantic.functional_serializers import PlainSerializer from pydantic.functional_validators import PlainValidator -from typing import Annotated, Any -from app.routes.schemas.conversation import type_model_name # Declare customized float type Float = Annotated[ diff --git a/backend/app/repositories/models/conversation.py b/backend/app/repositories/models/conversation.py index 72e2e4194..5627f7df2 100644 --- a/backend/app/repositories/models/conversation.py +++ b/backend/app/repositories/models/conversation.py @@ -1,43 +1,40 @@ from __future__ import annotations -from typing import Literal, Any, Annotated, Self, TypedDict, TypeGuard, TYPE_CHECKING -from pathlib import Path import re +from pathlib import Path +from typing import Annotated, Any, Literal, Self, TypedDict, TypeGuard from urllib.parse import urlparse + +from app.repositories.models.common import Base64EncodedBytes from app.routes.schemas.conversation import ( - SimpleMessage, - MessageInput, - type_model_name, + AttachmentContent, Content, - TextContent, + DocumentToolResult, ImageContent, - AttachmentContent, - ToolUseContent, - ToolUseContentBody, - ToolResult, - TextToolResult, - JsonToolResult, ImageToolResult, - DocumentToolResult, - ToolResultContentBody, - ToolResultContent, + JsonToolResult, + MessageInput, RelatedDocument, + SimpleMessage, + TextContent, + TextToolResult, + ToolResult, + ToolResultContent, + ToolResultContentBody, + ToolUseContent, + ToolUseContentBody, + type_model_name, ) from app.utils import generate_presigned_url - -from pydantic import BaseModel, Field, field_validator, Discriminator, JsonValue +from mypy_boto3_bedrock_runtime.literals import DocumentFormatType, ImageFormatType from mypy_boto3_bedrock_runtime.type_defs import ( ContentBlockTypeDef, - ToolUseBlockTypeDef, - ToolUseBlockOutputTypeDef, ToolResultBlockTypeDef, ToolResultContentBlockOutputTypeDef, + ToolUseBlockOutputTypeDef, + ToolUseBlockTypeDef, ) -from mypy_boto3_bedrock_runtime.literals import ( - DocumentFormatType, - ImageFormatType, -) -from app.repositories.models.common import Base64EncodedBytes +from pydantic import BaseModel, Discriminator, Field, JsonValue, field_validator class TextContentModel(BaseModel): diff --git a/backend/app/repositories/models/custom_bot.py b/backend/app/repositories/models/custom_bot.py index 19e9e9da1..b159b6aed 100644 --- a/backend/app/repositories/models/custom_bot.py +++ b/backend/app/repositories/models/custom_bot.py @@ -1,22 +1,21 @@ -from typing import Any, Dict, List, Type, get_args +from typing import Any, Dict, List, Literal, Type, get_args -from app.repositories.models.common import Float +from app.repositories.models.common import DynamicBaseModel, Float from app.repositories.models.custom_bot_guardrails import BedrockGuardrailsModel from app.repositories.models.custom_bot_kb import BedrockKnowledgeBaseModel from app.routes.schemas.bot import type_sync_status -from pydantic import BaseModel, ConfigDict, create_model from app.routes.schemas.conversation import type_model_name -from app.repositories.models.common import DynamicBaseModel +from pydantic import BaseModel, ConfigDict, create_model def _create_model_activate_model(model_names: List[str]) -> Type[DynamicBaseModel]: fields: Dict[str, Any] = { name.replace("-", "_").replace(".", "_"): (bool, True) for name in model_names } - return create_model("ModelActivateModel", __base__=DynamicBaseModel, **fields) + return create_model("ActiveModelsModel", __base__=DynamicBaseModel, **fields) -ModelActivateModel: Type[BaseModel] = _create_model_activate_model( +ActiveModelsModel: Type[BaseModel] = _create_model_activate_model( list(get_args(type_model_name)) ) @@ -94,7 +93,7 @@ class BotModel(BaseModel): conversation_quick_starters: list[ConversationQuickStarterModel] bedrock_knowledge_base: BedrockKnowledgeBaseModel | None bedrock_guardrails: BedrockGuardrailsModel | None - model_activate: ModelActivateModel # type: ignore + active_models: ActiveModelsModel # type: ignore def has_knowledge(self) -> bool: return ( @@ -126,7 +125,7 @@ class BotAliasModel(BaseModel): has_knowledge: bool has_agent: bool conversation_quick_starters: list[ConversationQuickStarterModel] - model_activate: ModelActivateModel # type: ignore + active_models: ActiveModelsModel # type: ignore class BotMeta(BaseModel): diff --git a/backend/app/routes/bot.py b/backend/app/routes/bot.py index 893d25a56..b6b60b30a 100644 --- a/backend/app/routes/bot.py +++ b/backend/app/routes/bot.py @@ -1,4 +1,4 @@ -from typing import Literal, Dict, Any +from typing import Any, Dict, Literal from app.dependencies import check_creating_bot_allowed from app.repositories.custom_bot import ( @@ -7,6 +7,7 @@ update_bot_visibility, ) from app.routes.schemas.bot import ( + ActiveModelsOutput, Agent, AgentTool, BedrockGuardrailsOutput, @@ -22,7 +23,6 @@ ConversationQuickStarter, GenerationParams, Knowledge, - ModelActivateOutput, ) from app.routes.schemas.conversation import type_model_name from app.usecases.bot import ( @@ -154,7 +154,7 @@ def get_private_bot(request: Request, bot_id: str): if bot.bedrock_guardrails else None ), - model_activate=ModelActivateOutput.model_validate(dict(bot.model_activate)), + active_models=ActiveModelsOutput.model_validate(dict(bot.active_models)), ) return output diff --git a/backend/app/routes/schemas/bot.py b/backend/app/routes/schemas/bot.py index addb517e0..a267859f0 100644 --- a/backend/app/routes/schemas/bot.py +++ b/backend/app/routes/schemas/bot.py @@ -33,20 +33,20 @@ def _create_model_activate_input(model_names: List[str]) -> Type[BaseSchema]: fields: Dict[str, Any] = { name.replace("-", "_").replace(".", "_"): (bool, True) for name in model_names } - return create_model("ModelActivateInput", **fields, __base__=BaseSchema) + return create_model("ActiveModelsInput", **fields, __base__=BaseSchema) -ModelActivateInput = _create_model_activate_input(list(get_args(type_model_name))) +ActiveModelsInput = _create_model_activate_input(list(get_args(type_model_name))) def create_model_activate_output(model_names: List[str]) -> Type[BaseSchema]: fields: Dict[str, Any] = { name.replace("-", "_").replace(".", "_"): (bool, True) for name in model_names } - return create_model("ModelActivateOutput", **fields, __base__=BaseSchema) + return create_model("ActiveModelsOutput", **fields, __base__=BaseSchema) -ModelActivateOutput = create_model_activate_output(list(get_args(type_model_name))) +ActiveModelsOutput = create_model_activate_output(list(get_args(type_model_name))) class GenerationParams(BaseSchema): @@ -123,7 +123,7 @@ class BotInput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] | None bedrock_knowledge_base: BedrockKnowledgeBaseInput | None = None bedrock_guardrails: BedrockGuardrailsInput | None = None - model_activate: ModelActivateInput # type: ignore + active_models: ActiveModelsInput # type: ignore class BotModifyInput(BaseSchema): @@ -137,7 +137,7 @@ class BotModifyInput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] | None bedrock_knowledge_base: BedrockKnowledgeBaseInput | None = None bedrock_guardrails: BedrockGuardrailsInput | None = None - model_activate: ModelActivateInput # type: ignore + active_models: ActiveModelsInput # type: ignore def _has_update_files(self) -> bool: return self.knowledge is not None and ( @@ -251,7 +251,7 @@ class BotModifyOutput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] bedrock_knowledge_base: BedrockKnowledgeBaseOutput | None bedrock_guardrails: BedrockGuardrailsOutput | None - model_activate: ModelActivateOutput # type: ignore + active_models: ActiveModelsOutput # type: ignore class BotOutput(BaseSchema): @@ -275,7 +275,7 @@ class BotOutput(BaseSchema): conversation_quick_starters: list[ConversationQuickStarter] bedrock_knowledge_base: BedrockKnowledgeBaseOutput | None bedrock_guardrails: BedrockGuardrailsOutput | None - model_activate: ModelActivateOutput # type: ignore + active_models: ActiveModelsOutput # type: ignore class BotMetaOutput(BaseSchema): @@ -306,7 +306,7 @@ class BotSummaryOutput(BaseSchema): sync_status: type_sync_status has_knowledge: bool conversation_quick_starters: list[ConversationQuickStarter] - model_activate: ModelActivateOutput # type: ignore + active_models: ActiveModelsOutput # type: ignore class BotSwitchVisibilityInput(BaseSchema): diff --git a/backend/app/routes/schemas/conversation.py b/backend/app/routes/schemas/conversation.py index ebeec7eaa..3e57fccfd 100644 --- a/backend/app/routes/schemas/conversation.py +++ b/backend/app/routes/schemas/conversation.py @@ -1,16 +1,9 @@ -from typing import Literal, Annotated, TYPE_CHECKING +from typing import Annotated, Literal +from app.repositories.models.common import Base64EncodedBytes from app.routes.schemas.base import BaseSchema -from pydantic import Field, Discriminator, JsonValue, root_validator - -from mypy_boto3_bedrock_runtime.literals import ( - DocumentFormatType, - ImageFormatType, -) - -# To avoid circular imports errors -if TYPE_CHECKING: - from app.repositories.models.common import Base64EncodedBytes +from mypy_boto3_bedrock_runtime.literals import DocumentFormatType, ImageFormatType +from pydantic import Discriminator, Field, JsonValue, root_validator type_model_name = Literal[ "claude-instant-v1", @@ -46,7 +39,7 @@ class ImageContent(BaseSchema): ..., description="MIME type of the image. Must be specified if `content_type` is `image`.", ) - body: "Base64EncodedBytes" = Field(..., description="Content body.") + body: Base64EncodedBytes = Field(..., description="Content body.") class AttachmentContent(BaseSchema): @@ -57,7 +50,7 @@ class AttachmentContent(BaseSchema): ..., description="File name of the attachment. Must be specified if `content_type` is `attachment`.", ) - body: "Base64EncodedBytes" = Field(..., description="Content body.") + body: Base64EncodedBytes = Field(..., description="Content body.") class FeedbackInput(BaseSchema): @@ -116,13 +109,13 @@ class JsonToolResult(BaseSchema): class ImageToolResult(BaseSchema): format: ImageFormatType - image: "Base64EncodedBytes" + image: Base64EncodedBytes class DocumentToolResult(BaseSchema): format: DocumentFormatType name: str - document: "Base64EncodedBytes" + document: Base64EncodedBytes ToolResult = TextToolResult | JsonToolResult | ImageToolResult | DocumentToolResult diff --git a/backend/app/usecases/bot.py b/backend/app/usecases/bot.py index 266066fc6..95a994219 100644 --- a/backend/app/usecases/bot.py +++ b/backend/app/usecases/bot.py @@ -28,6 +28,7 @@ update_bot_pin_status, ) from app.repositories.models.custom_bot import ( + ActiveModelsModel, AgentModel, AgentToolModel, BotAliasModel, @@ -36,11 +37,12 @@ ConversationQuickStarterModel, GenerationParamsModel, KnowledgeModel, - ModelActivateModel, ) from app.repositories.models.custom_bot_guardrails import BedrockGuardrailsModel from app.repositories.models.custom_bot_kb import BedrockKnowledgeBaseModel from app.routes.schemas.bot import ( + ActiveModelsInput, + ActiveModelsOutput, Agent, AgentTool, BotInput, @@ -53,8 +55,6 @@ GenerationParams, Knowledge, type_sync_status, - ModelActivateInput, - ModelActivateOutput, ) from app.routes.schemas.bot_guardrails import BedrockGuardrailsOutput from app.routes.schemas.bot_kb import BedrockKnowledgeBaseOutput @@ -213,8 +213,8 @@ def create_new_bot(user_id: str, bot_input: BotInput) -> BotOutput: if bot_input.bedrock_guardrails else None ), - model_activate=ModelActivateModel.model_validate( - dict(bot_input.model_activate) + active_models=ActiveModelsModel.model_validate( + dict(bot_input.active_models) ), ), ) @@ -268,9 +268,7 @@ def create_new_bot(user_id: str, bot_input: BotInput) -> BotOutput: if bot_input.bedrock_guardrails else None ), - model_activate=ModelActivateOutput.model_validate( - dict(bot_input.model_activate) - ), + active_models=ActiveModelsOutput.model_validate(dict(bot_input.active_models)), ) @@ -383,8 +381,8 @@ def modify_owned_bot( if modify_input.bedrock_guardrails else None ), - model_activate=ModelActivateOutput.model_validate( - dict(modify_input.model_activate) + active_models=ActiveModelsOutput.model_validate( + dict(modify_input.active_models) ), ) @@ -429,8 +427,8 @@ def modify_owned_bot( if modify_input.bedrock_guardrails else None ), - model_activate=ModelActivateOutput.model_validate( - dict(modify_input.model_activate) + active_models=ActiveModelsOutput.model_validate( + dict(modify_input.active_models) ), ) @@ -533,7 +531,7 @@ def fetch_all_bots_by_user_id( ConversationQuickStarter(**starter) for starter in item.get("ConversationQuickStarters", []) ] - or bot.model_activate != item["ModelActivate"] + or bot.active_models != item["ActiveModels"] ): # Update alias to the latest original bot store_alias( @@ -551,8 +549,8 @@ def fetch_all_bots_by_user_id( has_knowledge=bot.has_knowledge(), has_agent=bot.is_agent_enabled(), conversation_quick_starters=bot.conversation_quick_starters, - model_activate=ModelActivateModel.model_validate( - dict(bot.model_activate) + active_models=ActiveModelsModel.model_validate( + dict(bot.active_models) ), ), ) @@ -650,7 +648,7 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: ) for starter in bot.conversation_quick_starters ], - model_activate=ModelActivateOutput.model_validate(dict(bot.model_activate)), + active_models=ActiveModelsOutput.model_validate(dict(bot.active_models)), ) except RecordNotFoundError: @@ -685,9 +683,7 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: for starter in alias.conversation_quick_starters ] ), - model_activate=ModelActivateOutput.model_validate( - dict(alias.model_activate) - ), + active_models=ActiveModelsOutput.model_validate(dict(alias.active_models)), ) except RecordNotFoundError: pass @@ -717,8 +713,8 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: ) for starter in bot.conversation_quick_starters ], - model_activate=ModelActivateOutput.model_validate( - dict(bot.model_activate) + active_models=ActiveModelsOutput.model_validate( + dict(bot.active_models) ), ), ) @@ -741,7 +737,7 @@ def fetch_bot_summary(user_id: str, bot_id: str) -> BotSummaryOutput: ) for starter in bot.conversation_quick_starters ], - model_activate=ModelActivateOutput.model_validate(dict(bot.model_activate)), + active_models=ActiveModelsOutput.model_validate(dict(bot.active_models)), ) except RecordNotFoundError: raise RecordNotFoundError( diff --git a/backend/app/usecases/chat.py b/backend/app/usecases/chat.py index 745d66981..44d7808db 100644 --- a/backend/app/usecases/chat.py +++ b/backend/app/usecases/chat.py @@ -7,11 +7,8 @@ ) from app.agents.tools.knowledge import create_knowledge_tool from app.agents.utils import get_tool_by_name -from app.bedrock import ( - call_converse_api, - compose_args_for_converse_api, -) -from app.prompt import build_rag_prompt, PROMPT_TO_CITE_TOOL_RESULTS +from app.bedrock import call_converse_api, compose_args_for_converse_api +from app.prompt import PROMPT_TO_CITE_TOOL_RESULTS, build_rag_prompt from app.repositories.conversation import ( RecordNotFoundError, find_conversation_by_id, @@ -20,13 +17,13 @@ ) from app.repositories.custom_bot import find_alias_by_id, store_alias from app.repositories.models.conversation import ( - SimpleMessageModel, ConversationModel, MessageModel, RelatedDocumentModel, + SimpleMessageModel, TextContentModel, - ToolUseContentModel, ToolResultContentModel, + ToolUseContentModel, ) from app.repositories.models.custom_bot import ( BotAliasModel, @@ -47,8 +44,8 @@ from app.utils import get_current_time from app.vector_search import ( SearchResult, - search_result_to_related_document, search_related_docs, + search_result_to_related_document, to_guardrails_grounding_source, ) from ulid import ULID @@ -159,7 +156,7 @@ def prepare_conversation( for starter in bot.conversation_quick_starters ] ), - model_activate=bot.model_activate, + active_models=bot.active_models, ), ) diff --git a/backend/tests/test_repositories/test_conversation.py b/backend/tests/test_repositories/test_conversation.py index f8cf1079b..cbc072b18 100644 --- a/backend/tests/test_repositories/test_conversation.py +++ b/backend/tests/test_repositories/test_conversation.py @@ -35,13 +35,13 @@ ToolUseContentModelBody, ) from app.repositories.models.custom_bot import ( + ActiveModelsModel, AgentModel, AgentToolModel, BotModel, ConversationQuickStarterModel, GenerationParamsModel, KnowledgeModel, - ModelActivateModel, ) from boto3.dynamodb.conditions import Key from botocore.exceptions import ClientError @@ -534,7 +534,7 @@ def setUp(self): os.environ["CONVERSATION_TABLE_NAME"] = "test-table" os.environ["CONVERSATION_BUCKET_NAME"] = "test-bucket" - self.model_activate = ModelActivateModel( + self.active_models = ActiveModelsModel( claude3_sonnet_v1=True, claude3_haiku_v1=True, claude3_opus_v1=True, @@ -654,7 +654,7 @@ def setUp(self): ], bedrock_knowledge_base=None, bedrock_guardrails=None, - model_activate=self.model_activate, + active_models=self.active_models, ) self.bot2 = BotModel( @@ -698,7 +698,7 @@ def setUp(self): ], bedrock_knowledge_base=None, bedrock_guardrails=None, - model_activate=self.model_activate, # Added the missing field + active_models=self.active_models, # Added the missing field ) store_conversation("user", self.conversation1) diff --git a/backend/tests/test_repositories/test_custom_bot.py b/backend/tests/test_repositories/test_custom_bot.py index ba4605401..cd317f71c 100644 --- a/backend/tests/test_repositories/test_custom_bot.py +++ b/backend/tests/test_repositories/test_custom_bot.py @@ -22,6 +22,7 @@ update_knowledge_base_id, ) from app.repositories.models.custom_bot import ( + ActiveModelsModel, AgentModel, AgentToolModel, BotAliasModel, @@ -299,6 +300,7 @@ def test_update_bot(self): guardrail_arn="arn:aws:guardrail", guardrail_version="v1", ), + active_models=ActiveModelsModel(), ) bot = find_private_bot_by_id("user1", "1") @@ -388,6 +390,7 @@ def setUp(self) -> None: conversation_quick_starters=[ ConversationQuickStarterModel(title="QS title", example="QS example") ], + active_models=ActiveModelsModel(), ) alias2 = BotAliasModel( id="alias2", @@ -404,6 +407,7 @@ def setUp(self) -> None: conversation_quick_starters=[ ConversationQuickStarterModel(title="QS title", example="QS example") ], + active_models=ActiveModelsModel(), ) store_bot("user1", bot1) store_bot("user1", bot2) @@ -471,6 +475,7 @@ def setUp(self) -> None: conversation_quick_starters=[ ConversationQuickStarterModel(title="QS title", example="QS example") ], + active_models=ActiveModelsModel(), ) store_bot("user1", bot1) store_bot("user1", bot2) @@ -507,6 +512,7 @@ def test_update_bot_visibility(self): sync_status_reason="", display_retrieved_chunks=True, conversation_quick_starters=[], + active_models=ActiveModelsModel(), ) bots = fetch_all_bots_by_user_id("user1", limit=3) self.assertEqual(len(bots), 3) diff --git a/backend/tests/test_repositories/utils/bot_factory.py b/backend/tests/test_repositories/utils/bot_factory.py index 46a7d103f..95c848df1 100644 --- a/backend/tests/test_repositories/utils/bot_factory.py +++ b/backend/tests/test_repositories/utils/bot_factory.py @@ -5,6 +5,7 @@ from app.repositories.models.custom_bot import ( + ActiveModelsModel, AgentModel, AgentToolModel, BedrockGuardrailsModel, @@ -73,6 +74,7 @@ def create_test_private_bot( ), bedrock_knowledge_base=bedrock_knowledge_base, bedrock_guardrails=bedrock_guardrails, + active_models=ActiveModelsModel(), ) @@ -127,4 +129,5 @@ def create_test_public_bot( ), bedrock_knowledge_base=bedrock_knowledge_base, bedrock_guardrails=bedrock_guardrails, + active_models=ActiveModelsModel(), ) diff --git a/backend/tests/test_usecases/utils/bot_factory.py b/backend/tests/test_usecases/utils/bot_factory.py index 9fe8f0d05..40e4c8668 100644 --- a/backend/tests/test_usecases/utils/bot_factory.py +++ b/backend/tests/test_usecases/utils/bot_factory.py @@ -5,6 +5,7 @@ from app.agents.tools.internet_search import internet_search_tool from app.repositories.models.custom_bot import ( + ActiveModelsModel, AgentModel, AgentToolModel, BotAliasModel, @@ -77,6 +78,7 @@ def create_test_private_bot( conversation_quick_starters=[], bedrock_knowledge_base=bedrock_knowledge_base, bedrock_guardrails=bedrock_guardrails, + active_models=ActiveModelsModel(), ) @@ -131,6 +133,7 @@ def create_test_public_bot( conversation_quick_starters=[], bedrock_knowledge_base=bedrock_knowledge_base, bedrock_guardrails=bedrock_guardrails, + active_models=ActiveModelsModel(), ) @@ -148,6 +151,7 @@ def create_test_bot_alias(id, original_bot_id, is_pinned): has_knowledge=True, has_agent=False, conversation_quick_starters=[], + active_models=ActiveModelsModel(), ) diff --git a/frontend/src/@types/bot.d.ts b/frontend/src/@types/bot.d.ts index c0405967f..9bb1a1b23 100644 --- a/frontend/src/@types/bot.d.ts +++ b/frontend/src/@types/bot.d.ts @@ -2,7 +2,7 @@ import { BedrockKnowledgeBase } from '../features/knowledgeBase/types'; import { Model } from './conversation'; export type BotKind = 'private' | 'mixed'; -type ModelActivate = { +type ActiveModels = { [K in Model]: boolean; }; @@ -78,14 +78,14 @@ export type BotDetails = BotMeta & { conversationQuickStarters: ConversationQuickStarter[]; bedrockGuardrails: GuardrailsParams; bedrockKnowledgeBase: BedrockKnowledgeBase; - modelActivate: ModelActivate; + activeModels: ActiveModels; }; export type BotSummary = BotMeta & { hasKnowledge: boolean; hasAgent: boolean; conversationQuickStarters: ConversationQuickStarter[]; - modelActivate: ModelActivate; + activeModels: ActiveModels; }; export type BotFile = { @@ -107,7 +107,7 @@ export type RegisterBotRequest = { conversationQuickStarters: ConversationQuickStarter[]; bedrockGuardrails?: GuardrailsParams; bedrockKnowledgeBase?: BedrockKnowledgeBase; - modelActivate: ModelActivate; + activeModels: ActiveModels; }; export type RegisterBotResponse = BotDetails; @@ -123,7 +123,7 @@ export type UpdateBotRequest = { conversationQuickStarters: ConversationQuickStarter[]; bedrockGuardrails?: GuardrailsParams; bedrockKnowledgeBase?: BedrockKnowledgeBase; - modelActivate: ModelActivate; + activeModels: ActiveModels; }; export type UpdateBotResponse = { @@ -136,7 +136,7 @@ export type UpdateBotResponse = { displayRetrievedChunks: boolean; conversationQuickStarters: ConversationQuickStarter[]; bedrockKnowledgeBase: BedrockKnowledgeBase; - modelActivate: ModelActivate; + activeModels: ActiveModels; }; export type UpdateBotPinnedRequest = { diff --git a/frontend/src/components/SwitchBedrockModel.stories.tsx b/frontend/src/components/SwitchBedrockModel.stories.tsx index 13395ed3a..decd2dccd 100644 --- a/frontend/src/components/SwitchBedrockModel.stories.tsx +++ b/frontend/src/components/SwitchBedrockModel.stories.tsx @@ -1,8 +1,11 @@ import SwitchBedrockModel from './SwitchBedrockModel'; -import { MODEL_KEYS } from '../constants' -import { ModelActivate } from '../@types/bot'; +import { MODEL_KEYS } from '../constants'; +import { ActiveModels } from '../@types/bot'; -export const Ideal = () => [key, true]) -) as ModelActivate -}/>; +export const Ideal = () => ( + [key, true])) as ActiveModels + } + /> +); diff --git a/frontend/src/components/SwitchBedrockModel.tsx b/frontend/src/components/SwitchBedrockModel.tsx index 577180eb1..51f21d441 100644 --- a/frontend/src/components/SwitchBedrockModel.tsx +++ b/frontend/src/components/SwitchBedrockModel.tsx @@ -4,31 +4,40 @@ import { Popover, Transition } from '@headlessui/react'; import { Fragment } from 'react/jsx-runtime'; import { useMemo } from 'react'; import { PiCaretDown, PiCheck } from 'react-icons/pi'; -import { ModelActivate } from '../@types/bot'; +import { ActiveModels } from '../@types/bot'; import { toCamelCase } from '../utils/StringUtils'; interface Props extends BaseProps { - modelActivate: ModelActivate; + activeModels: ActiveModels; botId?: string | null; } const SwitchBedrockModel: React.FC = (props) => { - const { availableModels: allModels, modelId, setModelId } = useModel(props.botId, props.modelActivate); + const { + availableModels: allModels, + modelId, + setModelId, + } = useModel(props.botId, props.activeModels); const availableModels = useMemo(() => { - return allModels.filter(model => { - if (props.modelActivate) { - return props.modelActivate[toCamelCase(model.modelId) as keyof ModelActivate] === true; + return allModels.filter((model) => { + if (props.activeModels) { + return ( + props.activeModels[ + toCamelCase(model.modelId) as keyof ActiveModels + ] === true + ); } return true; }); - }, [allModels, props.modelActivate]); + }, [allModels, props.activeModels]); const modelName = useMemo(() => { - return availableModels.find((model) => model.modelId === modelId)?.label ?? ''; + return ( + availableModels.find((model) => model.modelId === modelId)?.label ?? '' + ); }, [availableModels, modelId]); - return (
diff --git a/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx b/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx index e550ee56b..0ba30fd02 100644 --- a/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx +++ b/frontend/src/features/knowledgeBase/pages/BotKbEditPage.tsx @@ -13,7 +13,11 @@ import Alert from '../../../components/Alert'; import KnowledgeFileUploader from '../../../components/KnowledgeFileUploader'; import GenerationConfig from '../../../components/GenerationConfig'; import Select from '../../../components/Select'; -import { BotFile, ConversationQuickStarter, ModelActivate } from '../../../@types/bot'; +import { + BotFile, + ConversationQuickStarter, + ActiveModels, +} from '../../../@types/bot'; import { ParsingModel } from '../types'; import { ulid } from 'ulid'; import { @@ -46,7 +50,7 @@ import { import { GUARDRAILS_FILTERS_THRESHOLD, GUARDRAILS_CONTECTUAL_GROUNDING_THRESHOLD, - MODEL_KEYS + MODEL_KEYS, } from '../../../constants'; import { ChunkingStrategy, @@ -59,20 +63,18 @@ import { SearchType, WebCrawlingScope, } from '../types'; -import { - toCamelCase -} from '../../../utils/StringUtils'; +import { toCamelCase } from '../../../utils/StringUtils'; const MISTRAL_ENABLED: boolean = import.meta.env.VITE_APP_ENABLE_MISTRAL === 'true'; const edgeGenerationParams = -MISTRAL_ENABLED === true + MISTRAL_ENABLED === true ? EDGE_MISTRAL_GENERATION_PARAMS : EDGE_GENERATION_PARAMS; const defaultGenerationConfig = -MISTRAL_ENABLED === true + MISTRAL_ENABLED === true ? DEFAULT_MISTRAL_GENERATION_CONFIG : DEFAULT_GENERATION_CONFIG; @@ -115,7 +117,8 @@ const BotKbEditPage: React.FC = () => { example: '', }, ]); - const [webCrawlingScope, setWebCrawlingScope] = useState('DEFAULT'); + const [webCrawlingScope, setWebCrawlingScope] = + useState('DEFAULT'); const [knowledgeBaseId, setKnowledgeBaseId] = useState(null); // Send null when creating a new bot const [embeddingsModel, setEmbeddingsModel] = @@ -130,7 +133,9 @@ const BotKbEditPage: React.FC = () => { const [relevanceThreshold, setRelevanceThreshold] = useState(0); const [guardrailArn, setGuardrailArn] = useState(''); const [guardrailVersion, setGuardrailVersion] = useState(''); - const [parsingModel, setParsingModel] = useState(undefined); + const [parsingModel, setParsingModel] = useState( + undefined + ); const [webCrawlingFilters, setWebCrawlingFilters] = useState<{ includePatterns: string[]; excludePatterns: string[]; @@ -139,59 +144,57 @@ const BotKbEditPage: React.FC = () => { excludePatterns: [''], }); - const [modelActivate, setModelActivate] = useState(() => { + const [activeModels, setActiveModels] = useState(() => { const initialState = MODEL_KEYS.reduce((acc, key) => { - acc[toCamelCase(key) as keyof ModelActivate] = true; + acc[toCamelCase(key) as keyof ActiveModels] = true; return acc; - }, {} as ModelActivate); + }, {} as ActiveModels); return initialState; }); - const modelActivateOptions: { - key: string, - label: string - }[] = (() => { - return MISTRAL_ENABLED - ? - [ + const activeModelsOptions: { + key: string; + label: string; + }[] = (() => { + return MISTRAL_ENABLED + ? [ { key: 'mistral-7b-instruct', - label: t('model.mistral7b.label') + label: t('model.mistral7b.label'), }, { key: 'mixtral-8x7b-instruct', - label: t('model.mistral8x7b.label') + label: t('model.mistral8x7b.label'), }, { key: 'mistral-large', - label: t('model.mistralLarge.label') - } + label: t('model.mistralLarge.label'), + }, ] - : - [ + : [ { key: 'claude-v3-sonnet', - label: t('model.sonnet3.label') + label: t('model.sonnet3.label'), }, { key: 'claude-v3-haiku', - label: t("model.haiku3.label") + label: t('model.haiku3.label'), }, { key: 'claude-v3-opus', - label: t("model.opus3.label") + label: t('model.opus3.label'), }, { key: 'claude-v3.5-sonnet', - label: t('model.sonnet3-5.label') + label: t('model.sonnet3-5.label'), }, { key: 'claude-v3.5-sonnet-v2', - label: t('model.sonnet3-5-v2.label') + label: t('model.sonnet3-5-v2.label'), }, { key: 'claude-v3.5-haiku', - label: t('model.haiku3-5.label') + label: t('model.haiku3-5.label'), }, { key: 'amazon-nova-pro', @@ -204,25 +207,25 @@ const BotKbEditPage: React.FC = () => { { key: 'amazon-nova-micro', label: t('model.novaMicro.label'), - } - ] + }, + ]; })(); const embeddingsModelOptions: { label: string; value: EmbeddingsModel; }[] = [ - { - label: t('knowledgeBaseSettings.embeddingModel.titan_v2.label'), - value: 'titan_v2', - }, - { - label: t( - 'knowledgeBaseSettings.embeddingModel.cohere_multilingual_v3.label' - ), - value: 'cohere_multilingual_v3', - }, - ]; + { + label: t('knowledgeBaseSettings.embeddingModel.titan_v2.label'), + value: 'titan_v2', + }, + { + label: t( + 'knowledgeBaseSettings.embeddingModel.cohere_multilingual_v3.label' + ), + value: 'cohere_multilingual_v3', + }, + ]; const [chunkingStrategy, setChunkingStrategy] = useState('default'); @@ -233,19 +236,31 @@ const BotKbEditPage: React.FC = () => { description: string; }[] = [ { - label: t('knowledgeBaseSettings.webCrawlerConfig.crawlingScope.default.label'), + label: t( + 'knowledgeBaseSettings.webCrawlerConfig.crawlingScope.default.label' + ), value: 'DEFAULT', - description: t('knowledgeBaseSettings.webCrawlerConfig.crawlingScope.default.hint'), + description: t( + 'knowledgeBaseSettings.webCrawlerConfig.crawlingScope.default.hint' + ), }, { - label: t('knowledgeBaseSettings.webCrawlerConfig.crawlingScope.subdomains.label'), + label: t( + 'knowledgeBaseSettings.webCrawlerConfig.crawlingScope.subdomains.label' + ), value: 'SUBDOMAINS', - description: t('knowledgeBaseSettings.webCrawlerConfig.crawlingScope.subdomains.hint'), + description: t( + 'knowledgeBaseSettings.webCrawlerConfig.crawlingScope.subdomains.hint' + ), }, { - label: t('knowledgeBaseSettings.webCrawlerConfig.crawlingScope.hostOnly.label'), + label: t( + 'knowledgeBaseSettings.webCrawlerConfig.crawlingScope.hostOnly.label' + ), value: 'HOST_ONLY', - description: t('knowledgeBaseSettings.webCrawlerConfig.crawlingScope.hostOnly.hint'), + description: t( + 'knowledgeBaseSettings.webCrawlerConfig.crawlingScope.hostOnly.hint' + ), }, ]; @@ -254,33 +269,35 @@ const BotKbEditPage: React.FC = () => { value: ChunkingStrategy; description: string; }[] = [ - { - label: t('knowledgeBaseSettings.chunkingStrategy.default.label'), - value: 'default', - description: t('knowledgeBaseSettings.chunkingStrategy.default.hint'), - }, - { - label: t('knowledgeBaseSettings.chunkingStrategy.fixed_size.label'), - value: 'fixed_size', - description: t('knowledgeBaseSettings.chunkingStrategy.fixed_size.hint'), - }, - { - label: t('knowledgeBaseSettings.chunkingStrategy.hierarchical.label'), - value: 'hierarchical', - description: t('knowledgeBaseSettings.chunkingStrategy.hierarchical.hint'), - }, - { - label: t('knowledgeBaseSettings.chunkingStrategy.semantic.label'), - value: 'semantic', - description: t('knowledgeBaseSettings.chunkingStrategy.semantic.hint'), - }, - { - label: t('knowledgeBaseSettings.chunkingStrategy.none.label'), - value: 'none', - description: t('knowledgeBaseSettings.chunkingStrategy.none.hint'), - }, - ]; - + { + label: t('knowledgeBaseSettings.chunkingStrategy.default.label'), + value: 'default', + description: t('knowledgeBaseSettings.chunkingStrategy.default.hint'), + }, + { + label: t('knowledgeBaseSettings.chunkingStrategy.fixed_size.label'), + value: 'fixed_size', + description: t('knowledgeBaseSettings.chunkingStrategy.fixed_size.hint'), + }, + { + label: t('knowledgeBaseSettings.chunkingStrategy.hierarchical.label'), + value: 'hierarchical', + description: t( + 'knowledgeBaseSettings.chunkingStrategy.hierarchical.hint' + ), + }, + { + label: t('knowledgeBaseSettings.chunkingStrategy.semantic.label'), + value: 'semantic', + description: t('knowledgeBaseSettings.chunkingStrategy.semantic.hint'), + }, + { + label: t('knowledgeBaseSettings.chunkingStrategy.none.label'), + value: 'none', + description: t('knowledgeBaseSettings.chunkingStrategy.none.hint'), + }, + ]; + const parsingModelOptions: { label: string; value: ParsingModel; @@ -294,12 +311,16 @@ const BotKbEditPage: React.FC = () => { { label: t('knowledgeBaseSettings.parsingModel.claude_3_sonnet_v1.label'), value: 'anthropic.claude-3-sonnet-v1', - description: t('knowledgeBaseSettings.parsingModel.claude_3_sonnet_v1.hint'), + description: t( + 'knowledgeBaseSettings.parsingModel.claude_3_sonnet_v1.hint' + ), }, { label: t('knowledgeBaseSettings.parsingModel.claude_3_haiku_v1.label'), value: 'anthropic.claude-3-haiku-v1', - description: t('knowledgeBaseSettings.parsingModel.claude_3_haiku_v1.hint'), + description: t( + 'knowledgeBaseSettings.parsingModel.claude_3_haiku_v1.hint' + ), }, ]; @@ -307,9 +328,8 @@ const BotKbEditPage: React.FC = () => { DEFAULT_FIXED_CHUNK_PARAMS ); - const [hierarchicalParams, setHierarchicalParams] = useState( - DEFAULT_HIERARCHICAL_CHUNK_PARAMS - ); + const [hierarchicalParams, setHierarchicalParams] = + useState(DEFAULT_HIERARCHICAL_CHUNK_PARAMS); const [semanticParams, setSemanticParams] = useState( DEFAULT_SEMANTIC_CHUNK_PARAMS @@ -330,28 +350,28 @@ const BotKbEditPage: React.FC = () => { value: string; description: string; }[] = [ - { - label: t('knowledgeBaseSettings.opensearchAnalyzer.icu.label'), - value: 'icu', - description: t('knowledgeBaseSettings.opensearchAnalyzer.icu.hint', { - tokenizer: OPENSEARCH_ANALYZER['icu'].analyzer!.tokenizer, - normalizer: OPENSEARCH_ANALYZER['icu'].analyzer!.characterFilters, - }), - }, - { - label: t('knowledgeBaseSettings.opensearchAnalyzer.kuromoji.label'), - value: 'kuromoji', - description: t('knowledgeBaseSettings.opensearchAnalyzer.kuromoji.hint', { - tokenizer: OPENSEARCH_ANALYZER['kuromoji'].analyzer!.tokenizer, - normalizer: OPENSEARCH_ANALYZER['icu'].analyzer!.characterFilters, - }), - }, - { - label: t('knowledgeBaseSettings.opensearchAnalyzer.none.label'), - value: 'none', - description: t('knowledgeBaseSettings.opensearchAnalyzer.none.hint'), - }, - ]; + { + label: t('knowledgeBaseSettings.opensearchAnalyzer.icu.label'), + value: 'icu', + description: t('knowledgeBaseSettings.opensearchAnalyzer.icu.hint', { + tokenizer: OPENSEARCH_ANALYZER['icu'].analyzer!.tokenizer, + normalizer: OPENSEARCH_ANALYZER['icu'].analyzer!.characterFilters, + }), + }, + { + label: t('knowledgeBaseSettings.opensearchAnalyzer.kuromoji.label'), + value: 'kuromoji', + description: t('knowledgeBaseSettings.opensearchAnalyzer.kuromoji.hint', { + tokenizer: OPENSEARCH_ANALYZER['kuromoji'].analyzer!.tokenizer, + normalizer: OPENSEARCH_ANALYZER['icu'].analyzer!.characterFilters, + }), + }, + { + label: t('knowledgeBaseSettings.opensearchAnalyzer.none.label'), + value: 'none', + description: t('knowledgeBaseSettings.opensearchAnalyzer.none.hint'), + }, + ]; const [searchParams, setSearchParams] = useState( DEFAULT_SEARCH_CONFIG @@ -362,17 +382,17 @@ const BotKbEditPage: React.FC = () => { value: SearchType; description: string; }[] = [ - { - label: t('searchSettings.searchType.hybrid.label'), - value: 'hybrid', - description: t('searchSettings.searchType.hybrid.hint'), - }, - { - label: t('searchSettings.searchType.semantic.label'), - value: 'semantic', - description: t('searchSettings.searchType.semantic.hint'), - }, - ]; + { + label: t('searchSettings.searchType.hybrid.label'), + value: 'hybrid', + description: t('searchSettings.searchType.hybrid.hint'), + }, + { + label: t('searchSettings.searchType.semantic.label'), + value: 'semantic', + description: t('searchSettings.searchType.semantic.hint'), + }, + ]; const { errorMessages, @@ -496,26 +516,43 @@ const BotKbEditPage: React.FC = () => { bot.conversationQuickStarters.length > 0 ? bot.conversationQuickStarters : [ - { - title: '', - example: '', - }, - ] + { + title: '', + example: '', + }, + ] ); setKnowledgeBaseId(bot.bedrockKnowledgeBase.knowledgeBaseId); setEmbeddingsModel(bot.bedrockKnowledgeBase!.embeddingsModel); - setChunkingStrategy(bot.bedrockKnowledgeBase!.chunkingConfiguration.chunkingStrategy); - if (bot.bedrockKnowledgeBase!.chunkingConfiguration.chunkingStrategy == 'fixed_size') { + setChunkingStrategy( + bot.bedrockKnowledgeBase!.chunkingConfiguration.chunkingStrategy + ); + if ( + bot.bedrockKnowledgeBase!.chunkingConfiguration.chunkingStrategy == + 'fixed_size' + ) { setFixedSizeParams( - (bot.bedrockKnowledgeBase!.chunkingConfiguration) as FixedSizeParams ?? DEFAULT_FIXED_CHUNK_PARAMS + (bot.bedrockKnowledgeBase! + .chunkingConfiguration as FixedSizeParams) ?? + DEFAULT_FIXED_CHUNK_PARAMS ); - } else if (bot.bedrockKnowledgeBase!.chunkingConfiguration.chunkingStrategy == 'hierarchical') { + } else if ( + bot.bedrockKnowledgeBase!.chunkingConfiguration.chunkingStrategy == + 'hierarchical' + ) { setHierarchicalParams( - (bot.bedrockKnowledgeBase!.chunkingConfiguration) as HierarchicalParams ?? DEFAULT_HIERARCHICAL_CHUNK_PARAMS + (bot.bedrockKnowledgeBase! + .chunkingConfiguration as HierarchicalParams) ?? + DEFAULT_HIERARCHICAL_CHUNK_PARAMS ); - } else if (bot.bedrockKnowledgeBase!.chunkingConfiguration.chunkingStrategy == 'semantic') { + } else if ( + bot.bedrockKnowledgeBase!.chunkingConfiguration.chunkingStrategy == + 'semantic' + ) { setSemanticParams( - (bot.bedrockKnowledgeBase!.chunkingConfiguration) as SemanticParams ?? DEFAULT_SEMANTIC_CHUNK_PARAMS + (bot.bedrockKnowledgeBase! + .chunkingConfiguration as SemanticParams) ?? + DEFAULT_SEMANTIC_CHUNK_PARAMS ); } @@ -563,12 +600,16 @@ const BotKbEditPage: React.FC = () => { : 0 ); setParsingModel(bot.bedrockKnowledgeBase.parsingModel); - setWebCrawlingScope(bot.bedrockKnowledgeBase.webCrawlingScope ?? 'DEFAULT'); + setWebCrawlingScope( + bot.bedrockKnowledgeBase.webCrawlingScope ?? 'DEFAULT' + ); setWebCrawlingFilters({ - includePatterns: bot.bedrockKnowledgeBase.webCrawlingFilters?.includePatterns || [''], - excludePatterns: bot.bedrockKnowledgeBase.webCrawlingFilters?.excludePatterns || [''], + includePatterns: bot.bedrockKnowledgeBase.webCrawlingFilters + ?.includePatterns || [''], + excludePatterns: bot.bedrockKnowledgeBase.webCrawlingFilters + ?.excludePatterns || [''], }); - setModelActivate(bot.modelActivate); + setActiveModels(bot.activeModels); }) .finally(() => { setIsLoading(false); @@ -583,17 +624,14 @@ const BotKbEditPage: React.FC = () => { return pattern.test(syncErrorMessage); }, []); - const onChangeModelActivate = useCallback( - (key: string, value: boolean) => { - setModelActivate((prevState) => { - const camelKey = toCamelCase(key) as keyof ModelActivate; - const newState = { ...prevState }; - newState[camelKey] = value; - return newState; - }); - }, - [] - ); + const onChangeActiveModels = useCallback((key: string, value: boolean) => { + setActiveModels((prevState) => { + const camelKey = toCamelCase(key) as keyof ActiveModels; + const newState = { ...prevState }; + newState[camelKey] = value; + return newState; + }); + }, []); const onChangeS3Url = useCallback( (s3Url: string, idx: number) => { @@ -791,16 +829,22 @@ const BotKbEditPage: React.FC = () => { // Update maxTokens based on the selected embeddings model const maxEdgeFixed = EDGE_FIXED_CHUNK_PARAMS.maxTokens.MAX[value]; const maxEdgeSemantic = EDGE_SEMANTIC_CHUNK_PARAMS.maxTokens.MAX[value]; - if (chunkingStrategy == 'fixed_size' && fixedSizeParams.maxTokens > maxEdgeFixed) { + if ( + chunkingStrategy == 'fixed_size' && + fixedSizeParams.maxTokens > maxEdgeFixed + ) { setFixedSizeParams((params) => ({ ...params, maxTokens: maxEdgeFixed, - })) - } else if (chunkingStrategy == 'semantic' && semanticParams.maxTokens > maxEdgeSemantic) { + })); + } else if ( + chunkingStrategy == 'semantic' && + semanticParams.maxTokens > maxEdgeSemantic + ) { setSemanticParams((params) => ({ ...params, maxTokens: maxEdgeSemantic, - })) + })); } }, [chunkingStrategy, fixedSizeParams.maxTokens, semanticParams.maxTokens] @@ -862,7 +906,8 @@ const BotKbEditPage: React.FC = () => { ); return false; } else if ( - fixedSizeParams.maxTokens > EDGE_FIXED_CHUNK_PARAMS.maxTokens.MAX[embeddingsModel] + fixedSizeParams.maxTokens > + EDGE_FIXED_CHUNK_PARAMS.maxTokens.MAX[embeddingsModel] ) { setErrorMessages( 'fixedSizeParams.maxTokens', @@ -873,7 +918,10 @@ const BotKbEditPage: React.FC = () => { return false; } - if (fixedSizeParams.overlapPercentage < EDGE_FIXED_CHUNK_PARAMS.overlapPercentage.MIN) { + if ( + fixedSizeParams.overlapPercentage < + EDGE_FIXED_CHUNK_PARAMS.overlapPercentage.MIN + ) { setErrorMessages( 'fixedSizeParams.overlapPercentage', t('validation.minRange.message', { @@ -882,7 +930,8 @@ const BotKbEditPage: React.FC = () => { ); return false; } else if ( - fixedSizeParams.overlapPercentage > EDGE_FIXED_CHUNK_PARAMS.overlapPercentage.MAX + fixedSizeParams.overlapPercentage > + EDGE_FIXED_CHUNK_PARAMS.overlapPercentage.MAX ) { setErrorMessages( 'fixedSizeParams.overlapPercentage', @@ -893,7 +942,10 @@ const BotKbEditPage: React.FC = () => { return false; } } else if (chunkingStrategy === 'hierarchical') { - if (hierarchicalParams.overlapTokens < EDGE_HIERARCHICAL_CHUNK_PARAMS.overlapTokens.MIN) { + if ( + hierarchicalParams.overlapTokens < + EDGE_HIERARCHICAL_CHUNK_PARAMS.overlapTokens.MIN + ) { setErrorMessages( 'hierarchicalParams.overlapTokens', t('validation.minRange.message', { @@ -903,7 +955,10 @@ const BotKbEditPage: React.FC = () => { return false; } - if (hierarchicalParams.maxParentTokenSize < EDGE_HIERARCHICAL_CHUNK_PARAMS.maxParentTokenSize.MIN) { + if ( + hierarchicalParams.maxParentTokenSize < + EDGE_HIERARCHICAL_CHUNK_PARAMS.maxParentTokenSize.MIN + ) { setErrorMessages( 'hierarchicalParams.maxParentTokenSize', t('validation.minRange.message', { @@ -912,18 +967,24 @@ const BotKbEditPage: React.FC = () => { ); return false; } else if ( - hierarchicalParams.maxParentTokenSize > EDGE_HIERARCHICAL_CHUNK_PARAMS.maxParentTokenSize.MAX[embeddingsModel] + hierarchicalParams.maxParentTokenSize > + EDGE_HIERARCHICAL_CHUNK_PARAMS.maxParentTokenSize.MAX[embeddingsModel] ) { setErrorMessages( 'hierarchicalParams.maxParentTokenSize', t('validation.maxRange.message', { - size: EDGE_HIERARCHICAL_CHUNK_PARAMS.maxParentTokenSize.MAX[embeddingsModel], + size: EDGE_HIERARCHICAL_CHUNK_PARAMS.maxParentTokenSize.MAX[ + embeddingsModel + ], }) ); return false; } - if (hierarchicalParams.maxChildTokenSize < EDGE_HIERARCHICAL_CHUNK_PARAMS.maxChildTokenSize.MIN) { + if ( + hierarchicalParams.maxChildTokenSize < + EDGE_HIERARCHICAL_CHUNK_PARAMS.maxChildTokenSize.MIN + ) { setErrorMessages( 'hierarchicalParams.maxChildTokenSize', t('validation.minRange.message', { @@ -932,18 +993,24 @@ const BotKbEditPage: React.FC = () => { ); return false; } else if ( - hierarchicalParams.maxChildTokenSize > EDGE_HIERARCHICAL_CHUNK_PARAMS.maxChildTokenSize.MAX[embeddingsModel] + hierarchicalParams.maxChildTokenSize > + EDGE_HIERARCHICAL_CHUNK_PARAMS.maxChildTokenSize.MAX[embeddingsModel] ) { setErrorMessages( 'hierarchicalParams.maxChildTokenSize', t('validation.maxRange.message', { - size: EDGE_HIERARCHICAL_CHUNK_PARAMS.maxChildTokenSize.MAX[embeddingsModel], + size: EDGE_HIERARCHICAL_CHUNK_PARAMS.maxChildTokenSize.MAX[ + embeddingsModel + ], }) ); return false; } - if (hierarchicalParams.maxParentTokenSize < hierarchicalParams.maxChildTokenSize) { + if ( + hierarchicalParams.maxParentTokenSize < + hierarchicalParams.maxChildTokenSize + ) { setErrorMessages( 'hierarchicalParams.maxParentTokenSize', t('validation.parentTokenRange.message') @@ -960,7 +1027,8 @@ const BotKbEditPage: React.FC = () => { ); return false; } else if ( - semanticParams.maxTokens > EDGE_SEMANTIC_CHUNK_PARAMS.maxTokens.MAX[embeddingsModel] + semanticParams.maxTokens > + EDGE_SEMANTIC_CHUNK_PARAMS.maxTokens.MAX[embeddingsModel] ) { setErrorMessages( 'semanticParams.maxTokens', @@ -971,7 +1039,9 @@ const BotKbEditPage: React.FC = () => { return false; } - if (semanticParams.bufferSize < EDGE_SEMANTIC_CHUNK_PARAMS.bufferSize.MIN) { + if ( + semanticParams.bufferSize < EDGE_SEMANTIC_CHUNK_PARAMS.bufferSize.MIN + ) { setErrorMessages( 'semanticParams.bufferSize', t('validation.minRange.message', { @@ -991,7 +1061,10 @@ const BotKbEditPage: React.FC = () => { return false; } - if (semanticParams.breakpointPercentileThreshold < EDGE_SEMANTIC_CHUNK_PARAMS.breakpointPercentileThreshold.MIN) { + if ( + semanticParams.breakpointPercentileThreshold < + EDGE_SEMANTIC_CHUNK_PARAMS.breakpointPercentileThreshold.MIN + ) { setErrorMessages( 'semanticParams.breakpointPercentileThreshold', t('validation.minRange.message', { @@ -1000,7 +1073,8 @@ const BotKbEditPage: React.FC = () => { ); return false; } else if ( - semanticParams.breakpointPercentileThreshold > EDGE_SEMANTIC_CHUNK_PARAMS.breakpointPercentileThreshold.MAX + semanticParams.breakpointPercentileThreshold > + EDGE_SEMANTIC_CHUNK_PARAMS.breakpointPercentileThreshold.MAX ) { setErrorMessages( 'semanticParams.breakpointPercentileThreshold', @@ -1149,7 +1223,7 @@ const BotKbEditPage: React.FC = () => { guardrailArn: '', guardrailVersion: '', }, - modelActivate, + activeModels, }) .then(() => { navigate('/bot/explore'); @@ -1194,7 +1268,7 @@ const BotKbEditPage: React.FC = () => { parsingModel, webCrawlingScope, webCrawlingFilters, - modelActivate, + activeModels, ]); const onClickEdit = useCallback(() => { @@ -1272,7 +1346,7 @@ const BotKbEditPage: React.FC = () => { guardrailArn: guardrailArn, guardrailVersion: guardrailVersion, }, - modelActivate, + activeModels, }) .then(() => { navigate('/bot/explore'); @@ -1323,7 +1397,7 @@ const BotKbEditPage: React.FC = () => { parsingModel, webCrawlingScope, webCrawlingFilters, - modelActivate, + activeModels, ]); const [isOpenSamples, setIsOpenSamples] = useState(false); @@ -1496,9 +1570,7 @@ const BotKbEditPage: React.FC = () => { /> { onClickRemoveUrls(idx); }}> @@ -1521,10 +1593,11 @@ const BotKbEditPage: React.FC = () => { isDefaultShow={false} label={t('knowledgeBaseSettings.webCrawlerConfig.title')} className="py-2"> -