We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76cb412 commit bb0c619Copy full SHA for bb0c619
src/together/commands/inference.py
@@ -173,9 +173,13 @@ def _run_complete(args: argparse.Namespace) -> None:
173
# TODO Add exception when generated_text has error, See together docs
174
try:
175
text = str(response["output"]["choices"][0]["text"])
176
- except Exception as e:
177
- logger.critical(f"Error raised: {e}")
178
- exit_1(logger)
+ except Exception:
+ try:
+ logger.critical(f"Error raised: {response['output']['error']}")
179
+ exit_1(logger)
180
+ except Exception as e:
181
+ logger.critical(f"Error raised: {e}")
182
183
184
if args.stop is not None:
185
# TODO remove this and permanently implement api stop_word
0 commit comments