-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(opentrons-ai-client): add jotai and custom hook for call api #15029
Conversation
add api call function close AUTH-
…d fetch function add jotai to make state management easy add fetch function close AUTH-
@@ -105,6 +105,7 @@ | |||
"handlebars-loader": "^1.7.1", | |||
"html-webpack-plugin": "^3.2.0", | |||
"identity-obj-proxy": "^3.0.0", | |||
"jotai": "2.8.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to this since I cannot install the package without this.
I will dig into this issue to remove.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue was that I forgot to add opentrons-ai-client
to workspace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oooh why do you need different favicon sizes? is it for different device sizes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we don't need to do this at this moment since the design doesn't support a smartphone and a tablet but we don't know what kind of devices user will use.
@@ -1,4 +1,5 @@ | |||
import React from 'react' | |||
// import { css } from 'styled-components' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot to delete this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will use this soon for adding style to markdown part.
}, | ||
query: prompt, | ||
}) | ||
console.log('response', response) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgotten console log?
const userPrompt = watch('userPrompt') ?? '' | ||
const [preparedPrompt] = useAtom(preparedPromptAtom) | ||
const [, setChatData] = useAtom(chatDataAtom) | ||
const [submitted, setSubmitted] = React.useState(false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const [submitted, setSubmitted] = React.useState(false) | |
const [submitted, setSubmitted] = React.useState<boolean>(false) |
const { userPrompt } = data | ||
console.log('user prompt', userPrompt) | ||
} | ||
const [data, setData] = React.useState<any>(null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data can be any
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is temporary type since we haven't started working on be.
Josh, Elyor and myself will start working on be and this type will be updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
…5029) * feat(opentrons-ai-client): add jotai and custom hook for call api
…5029) * feat(opentrons-ai-client): add jotai and custom hook for call api
Overview
introduce a statement manage pacekage,
jotai
(https://jotai.org/)The reasons I selected jotai are below.
add a function to call api (this will be update soon)
update ChatDisplay to align with the design.
markdown parsing part is waiting for the design team's update
app_test.mov
Test Plan
Changelog
Review requests
Risk assessment
low