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

feat(ai-server): fake responses for development #16503

Open
wants to merge 1 commit into
base: edge
Choose a base branch
from

Conversation

y3rsh
Copy link
Collaborator

@y3rsh y3rsh commented Oct 16, 2024

Overview

https://opentrons.atlassian.net/browse/AUTH-935
Provide realistic responses from the API that mimic production. Add 2 additional responses that need error handling.

Fakes available are in the API docs

image

Test Plan and Hands on Testing

Alter UI call to chat/completion

// opentrons-ai-client/src/molecules/InputPrompt/index.tsx
      const config = {
        url,
        method: 'POST',
        headers,
        data: {
          message: userPrompt,
          history: chatHistory,
          fake: true,
          fake_key: 'pcr',
        },
{
    "message": "Validation error",
    "details": [
        {
            "type": "literal_error",
            "loc": [
                "body",
                "fake_key"
            ],
            "msg": "Input should be 'reagent transfer', 'reagent transfer flex', 'pcr', 'pcr flex', 'no markdown' or 'empty reply'",
            "input": "fake_value",
            "ctx": {
                "expected": "'reagent transfer', 'reagent transfer flex', 'pcr', 'pcr flex', 'no markdown' or 'empty reply'"
            }
        }
    ]
}

@y3rsh y3rsh self-assigned this Oct 16, 2024
@y3rsh y3rsh requested a review from a team as a code owner October 16, 2024 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant