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

Streamline frontend send chat message network calls 🛠 #825

Open
pmarsh-scottlogic opened this issue Feb 6, 2024 · 0 comments
Open

Streamline frontend send chat message network calls 🛠 #825

pmarsh-scottlogic opened this issue Feb 6, 2024 · 0 comments
Labels
backend Requires work on the backend frontend Requires work on the frontend refactor Improve code quality

Comments

@pmarsh-scottlogic
Copy link
Contributor

pmarsh-scottlogic commented Feb 6, 2024

The response from sending a chat message

openai/chat takes a message like

{
    "message": "hello",
    "currentLevel": 0
}

and returns a response like:

{
    "reply": "Hello! How can I assist you today?",
    "defenceReport": {
        "blockedReason": "",
        "isBlocked": false,
        "alertedDefences": [],
        "triggeredDefences": []
    },
    "wonLevel": false,
    "isError": false,
    "openAIErrorMessage": null,
    "sentEmails": []
}

🔧 Which all looks pretty good, except some of these things are empty / containing a default value most of the time. For example, most of the time a chat message won't result in sentEmails. And the defenceReport is simply irrelevant for levels 1 and 2.

@pmarsh-scottlogic pmarsh-scottlogic added frontend Requires work on the frontend backend Requires work on the backend refactor Improve code quality labels Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Requires work on the backend frontend Requires work on the frontend refactor Improve code quality
Projects
None yet
Development

No branches or pull requests

1 participant