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

Need error handling for empty responses from the server #887

Open
rhennigan opened this issue Nov 6, 2024 · 0 comments
Open

Need error handling for empty responses from the server #887

rhennigan opened this issue Nov 6, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@rhennigan
Copy link
Member

LLMSynthesize tasks should throw an error cell to the top when content received is empty.

ConfirmMatch[ llmSynthesize0[ prompt, evaluator, 1 ], Except[ "", _String ], "Result" ],

Debug Data

Property Value
Name "Wolfram/Chatbook"
Version "1.5.2"
ReleaseID "e2023863f4ea7331aa964621857d7a4a095a6524"
EvaluationEnvironment "Session"
FrontEndVersion "Desktop: 14.2 for Mac OS X ARM (64-bit) (November 6, 2024)"
KernelVersion "14.2.0 for Mac OS X ARM (64-bit) (November 6, 2024)"
SystemID "MacOSX-ARM64"
Notebooks True
DynamicEvaluation True
SynchronousEvaluation False
TaskEvaluation False

Settings

Property Value
InheritanceTest True
StyleSheetVersion "1.5.2.3939536254"

Failure Data

<|
  "Evaluation" :> Wolfram`Chatbook`Common`llmSynthesize["Your task is to read a chat transcript between a user and assistant, and then select the most relevant Wolfram Language documentation snippets that could help the assistant answer the user's latest message. Each snippet is uniquely identified by a URI (always starts with 'paclet:' or 'https://resources.wolframcloud.com').\n\nChoose up to 5 documentation snippets that would help answer the user's MOST RECENT message. Respond only with the corresponding URIs ...
  "Information" -> "Result@@Source/Chatbook/LLMUtilities.wl:37,5-37,92"
  "ConfirmationType" -> "ConfirmMatch"
  "Expression" :> Failure["InvalidResponse", <|"Data" -> {<|"BodyChunk" -> "", "BodyChunkProcessed" -> {}, "StatusCode" -> 200, "EventName" -> "BodyChunkReceived"|>}|>]
  "Pattern" -> Except["", _String]
  "Stack" :> Wolfram`Chatbook`Common`Private`$stack$31145
  "Failure" -> Failure["ConfirmationFailed", <|"MessageTemplate" -> "Result@@Source/Chatbook/LLMUtilities.wl:37,5-37,92", "MessageParameters" -> {}, "ConfirmationType" -> "ConfirmMatch", "Expression" :> Failure["InvalidResponse", <|"Data" -> {<|"BodyChunk" -> "", "BodyChunkProcessed" -> {}, "StatusCode" -> 200, "EventName" -> "BodyChunkReceived"|>}|>], "Information" -> "Result@@Source/Chatbook/LLMUtilities.wl:37,5-37,92", "Pattern" -> Except["", _String]|>]
  "Arguments" -> {}
|>

Stack Data

trimURL
throwFailure
catchTop
@rhennigan rhennigan added the bug Something isn't working label Nov 6, 2024
@rhennigan rhennigan self-assigned this Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant