Skip to content

Commit

Permalink
feat(opentrons-ai-client): add Serial dilution as an option (#17049)
Browse files Browse the repository at this point in the history
<!--
Thanks for taking the time to open a Pull Request (PR)! Please make sure
you've read the "Opening Pull Requests" section of our Contributing
Guide:


https://github.com/Opentrons/opentrons/blob/edge/CONTRIBUTING.md#opening-pull-requests

GitHub provides robust markdown to format your PR. Links, diagrams,
pictures, and videos along with text formatting make it possible to
create a rich and informative PR. For more information on GitHub
markdown, see:


https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax

To ensure your code is reviewed quickly and thoroughly, please fill out
the sections below to the best of your ability!
-->

# Overview
This adds `Serial dilution` to Application choices

![image](https://github.com/user-attachments/assets/29764e18-cac8-43eb-87ac-5a9b8bec1612)

Closes AUTH-1114

<!--
Describe your PR at a high level. State acceptance criteria and how this
PR fits into other work. Link issues, PRs, and other relevant resources.
-->

## Test Plan and Hands on Testing
Go to OpentronsAI and check indeed `Serial dilution` exists

<!--
Describe your testing of the PR. Emphasize testing not reflected in the
code. Attach protocols, logs, screenshots and any other assets that
support your testing.
-->

## Changelog

<!--
List changes introduced by this PR considering future developers and the
end user. Give careful thought and clear documentation to breaking
changes.
-->

## Review requests
Open UI and check indeed `Serial dilution` exists
<!--
- What do you need from reviewers to feel confident this PR is ready to
merge?
- Ask questions.
-->

## Risk assessment
Low
<!--
- Indicate the level of attention this PR needs.
- Provide context to guide reviewers.
- Discuss trade-offs, coupling, and side effects.
- Look for the possibility, even if you think it's small, that your
change may affect some other part of the system.
- For instance, changing return tip behavior may also change the
behavior of labware calibration.
- How do your unit tests and on hands on testing mitigate this PR's
risks and the risk of future regressions?
- Especially in high risk PRs, explain how you know your testing is
enough.
-->
  • Loading branch information
Elyorcv authored Dec 6, 2024
1 parent 0644df1 commit 9233856
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"application_scientific_dropdown_placeholder": "Select an option",
"basic_aliquoting": "Basic aliquoting",
"pcr": "PCR",
"serial_dilution": "Serial dilution",
"other": "Other",
"application_other_title": "Other application",
"application_other_caption": "Example: “cherrypicking” or “serial dilution”",
Expand Down
1 change: 1 addition & 0 deletions opentrons-ai-client/src/molecules/ChatDisplay/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ function ParagraphText(props: JSX.IntrinsicAttributes): JSX.Element {
{...props}
fontSize={TYPOGRAPHY.fontSize20}
lineHeight={TYPOGRAPHY.lineHeight24}
css="white-space: pre-wrap;"
/>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ControlledInputField } from '../../atoms/ControlledInputField'

export const BASIC_ALIQUOTING = 'basic_aliquoting'
export const PCR = 'pcr'
export const SERIAL_DILUTION = 'serial_dilution'
export const OTHER = 'other'
export const APPLICATION_SCIENTIFIC_APPLICATION =
'application.scientificApplication'
Expand All @@ -19,6 +20,7 @@ export function ApplicationSection(): JSX.Element | null {
const options = [
{ name: t(BASIC_ALIQUOTING), value: BASIC_ALIQUOTING },
{ name: t(PCR), value: PCR },
{ name: t(SERIAL_DILUTION), value: SERIAL_DILUTION },
{ name: t(OTHER), value: OTHER },
]

Expand Down
10 changes: 5 additions & 5 deletions opentrons-ai-client/src/resources/utils/createProtocolUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ export function generateChatPrompt(
const defs = getOnlyLatestDefs()

const robotType = t(values.instruments.robot)
const scientificApplication = t(values.application.scientificApplication)
const description = values.application.description
const scientificApplication = `- ${t(
values.application.scientificApplication
)}`
const description = `- ${values.application.description}`
const pipetteMounts =
values.instruments.pipettes === TWO_PIPETTES
? [
Expand Down Expand Up @@ -209,9 +211,7 @@ export function generateChatPrompt(

const prompt = `${t('create_protocol_prompt_robot', { robotType })}\n${t(
'application_title'
)}: \n${scientificApplication}\n\n${t(
'description'
)}: \n${description}\n\n${t(
)}:\n${scientificApplication}\n\n${t('description')}:\n${description}\n\n${t(
'pipette_mounts'
)}:\n\n${pipetteMounts}${flexGripper}\n\n${t(
'modules_title'
Expand Down

0 comments on commit 9233856

Please sign in to comment.