Skip to content
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

refactor(opentrons-ai-client): refactoring api call and inputprompt component #15193

Merged
merged 40 commits into from
May 29, 2024

Conversation

koji
Copy link
Contributor

@koji koji commented May 15, 2024

Overview

refactoring api call and input prompt component
add a new package for testing axios

close AUTH-402

Test Plan

  1. make teardown-js && make setup-js
  2. make -C opentrons-ai-client dev
  3. open localhost:5173 (the port must be 5173 since the backend allows us to use only 5173 port)
  4. log in (if you don't have an account, you will need to sign up)
  5. send a prompt
    check the app displays your prompt and gets the return from OpenAI API

Changelog

  • add custom hook for callApi and get access token
  • export a function as a util function
  • update paragraph text style to align the font styles

Review requests

Risk assessment

low

@koji
Copy link
Contributor Author

koji commented May 15, 2024

  • add a custom hook for data fetch
  • add a custom hook for token retrieving
  • update tests
  • add test for useGetAccessToken
  • fix fetch functionality
  • merge edge

@koji koji marked this pull request as ready for review May 21, 2024 07:54
@koji koji requested a review from a team as a code owner May 21, 2024 07:54
@koji koji requested review from ncdiehl11, jerader and y3rsh and removed request for a team May 21, 2024 07:54
Copy link
Collaborator

@ncdiehl11 ncdiehl11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code all looks good, just having trouble testing the response after posting a prompt. Maybe we can chat IRL about how to test?

opentrons-ai-client/src/resources/utils/utils.ts Outdated Show resolved Hide resolved
@Elyorcv
Copy link
Contributor

Elyorcv commented May 21, 2024

@koji please rebase

Copy link
Member

@y3rsh y3rsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me against #15287

@koji koji merged commit f8ec80a into edge May 29, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants