Skip to content

Conversation

leseb
Copy link
Contributor

@leseb leseb commented Apr 19, 2024

When an error occurs in the chat, we don't want to surface the whole
server stacktrace but let the chat handle the exception and return a
proper message.

Here is an example:

ilab chat
╭────────────────────────────────────────────────────────── system ──────────────────────────────────────────────────────────╮
│ Welcome to Chat CLI w/ MERLINITE-7B-LAB-Q4_K_M (type /h for help)                                                          │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
>>> hello                                                                                                         [S][default]
Message too large for context size.

We just print the relevant information and hide the internal server
exception.

Fixes: #937
Signed-off-by: Sébastien Han seb@redhat.com

ON-TOP of #925. Let's merge #925 first.

@github-actions github-actions bot added the testing Relates to testing label Apr 19, 2024
@russellb
Copy link
Member

@leseb needs a rebase now - but thank you for the fixes!

@leseb leseb force-pushed the ignore-stdout-stderr-on-temp-server branch from 9679a7d to 966c9c6 Compare April 23, 2024 15:47
@leseb
Copy link
Contributor Author

leseb commented Apr 23, 2024

@leseb needs a rebase now - but thank you for the fixes!

Done, thanks!

@leseb leseb force-pushed the ignore-stdout-stderr-on-temp-server branch from 966c9c6 to 09f67cc Compare April 23, 2024 15:57
@alimaredia alimaredia self-requested a review April 24, 2024 05:56
Copy link
Member

@russellb russellb left a comment

Choose a reason for hiding this comment

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

This lgtm, but I'm not going to merge since @alimaredia self-requesteed a review

Copy link
Member

@russellb russellb left a comment

Choose a reason for hiding this comment

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

oops - meant to Approve, not Request Changes

Copy link
Member

@nathan-weinberg nathan-weinberg left a comment

Choose a reason for hiding this comment

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

LGTM as well

@leseb leseb force-pushed the ignore-stdout-stderr-on-temp-server branch 2 times, most recently from 739f9c5 to 0eeccf7 Compare April 25, 2024 08:01
When an error occurs in the chat, we don't want to surface the whole
server stacktrace but let the chat handle the exception and return a
proper message.

Here is an example:

```
ilab chat
╭────────────────────────────────────────────────────────── system ──────────────────────────────────────────────────────────╮
│ Welcome to Chat CLI w/ MERLINITE-7B-LAB-Q4_K_M (type /h for help)                                                          │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
>>> hello                                                                                                         [S][default]
Message too large for context size.
```

We just print the relevant information and hide the internal server
exception.

Fixes: instructlab#937
Signed-off-by: Sébastien Han <seb@redhat.com>
@alimaredia alimaredia merged commit 29ac20b into instructlab:main Apr 25, 2024
@leseb leseb deleted the ignore-stdout-stderr-on-temp-server branch May 3, 2024 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Relates to testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

do not print exceptions from the server when running the server with ilab chat
4 participants