Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
statefb committed Jan 14, 2025
1 parent 61023f4 commit 1bb4d64
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions backend/app/usecases/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ def create_new_bot(user_id: str, bot_input: BotInput) -> BotOutput:
if bot_input.bedrock_guardrails
else None
),
active_models=ActiveModelsModel.model_validate(dict(bot_input.active_models)),
active_models=ActiveModelsModel.model_validate(
dict(bot_input.active_models)
),
),
)
return BotOutput(
Expand Down Expand Up @@ -261,7 +263,9 @@ def create_new_bot(user_id: str, bot_input: BotInput) -> BotOutput:
]
),
bedrock_knowledge_base=(
BedrockKnowledgeBaseOutput(**(bot_input.bedrock_knowledge_base.model_dump()))
BedrockKnowledgeBaseOutput(
**(bot_input.bedrock_knowledge_base.model_dump())
)
if bot_input.bedrock_knowledge_base
else None
),
Expand Down Expand Up @@ -323,7 +327,8 @@ def modify_owned_bot(
tools=[
AgentToolModel(name=t.name, description=t.description)
for t in [
get_tool_by_name(tool_name) for tool_name in modify_input.agent.tools
get_tool_by_name(tool_name)
for tool_name in modify_input.agent.tools
]
]
)
Expand Down Expand Up @@ -371,7 +376,9 @@ def modify_owned_bot(
]
),
bedrock_knowledge_base=(
BedrockKnowledgeBaseModel(**modify_input.bedrock_knowledge_base.model_dump())
BedrockKnowledgeBaseModel(
**modify_input.bedrock_knowledge_base.model_dump()
)
if modify_input.bedrock_knowledge_base
else None
),
Expand All @@ -380,7 +387,9 @@ def modify_owned_bot(
if modify_input.bedrock_guardrails
else None
),
active_models=ActiveModelsOutput.model_validate(dict(modify_input.active_models)),
active_models=ActiveModelsOutput.model_validate(
dict(modify_input.active_models)
),
)

return BotModifyOutput(
Expand Down Expand Up @@ -424,7 +433,9 @@ def modify_owned_bot(
if modify_input.bedrock_guardrails
else None
),
active_models=ActiveModelsOutput.model_validate(dict(modify_input.active_models)),
active_models=ActiveModelsOutput.model_validate(
dict(modify_input.active_models)
),
)


Expand Down

0 comments on commit 1bb4d64

Please sign in to comment.