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

fix(backend): AGE-391 Fix different error info in playground and evals #1857

Merged
merged 2 commits into from
Jul 9, 2024

Conversation

jp-agenta
Copy link
Contributor

An existing try-except mechanism why hiding valuable information only in evaluation mode, and not in playground mode

Playground (correct)
Screenshot 2024-07-08 at 15 23 22
Evaluations (incorrect — before)
Screenshot 2024-07-08 at 15 23 07
Evaluations (correct — after)
Screenshot 2024-07-08 at 15 22 57

An existing try-except mechanism why hiding valuable information only in evaluation mode, and not in playground mode
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jul 8, 2024
Copy link

vercel bot commented Jul 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
agenta ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 8, 2024 2:23pm

@dosubot dosubot bot added Backend bug Something isn't working labels Jul 8, 2024
Copy link
Member

@mmabrouk mmabrouk left a comment

Choose a reason for hiding this comment

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

Thanks @jp-agenta !

Awaiting test in oss/cloud.beta to merge

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 8, 2024
Copy link
Member

@mmabrouk mmabrouk left a comment

Choose a reason for hiding this comment

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

Thanks @jp-agenta

The fix solves the issue for wrong api key. However it does not resolve the issue for the case where for instance the model is called with json format (see jam) but it does not allow that.

https://jam.dev/c/66077ee8-94cc-4c9c-84e4-690fa73ca584

In such case, the response is 500 and actually contains the detail and the traceback from the call. In fact, I would argue that the traceback from llm_app_service.py is not very useful, what is useful is only the traceback from the llm app itself, no?

{
    "detail": {
        "error": "Model gpt-3.5-turbo does not support JSON response format",
        "traceback": "Traceback (most recent call last):\n  File \"/var/task/agenta/sdk/decorators/llm_entrypoint.py\", line 194, in execute_function\n    result = await func(*args, **func_params[\"params\"])\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/var/task/agenta/sdk/decorators/tracing.py\", line 78, in async_wrapper\n    raise e\n  File \"/var/task/agenta/sdk/decorators/tracing.py\", line 59, in async_wrapper\n    result = await func(*args, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/var/task/_app.py\", line 88, in generate\n    raise ValueError(\nValueError: Model gpt-3.5-turbo does not support JSON response format\n"
    }
}

@dosubot dosubot bot removed the lgtm This PR has been approved by a maintainer label Jul 8, 2024
@jp-agenta
Copy link
Contributor Author

On it.

@jp-agenta
Copy link
Contributor Author

jp-agenta commented Jul 9, 2024

Screenshot 2024-07-09 at 19 18 15 Screenshot 2024-07-09 at 19 18 29

Actually, I do get the expected response without any changes.
@mmabrouk

@jp-agenta
Copy link
Contributor Author

Copy link
Member

@mmabrouk mmabrouk left a comment

Choose a reason for hiding this comment

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

It does now work indeed. Not sure what happened..

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 9, 2024
@mmabrouk mmabrouk merged commit f5b07dc into main Jul 9, 2024
9 checks passed
@mmabrouk mmabrouk deleted the fix/different-errors-playground-evaluations branch July 9, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend bug Something isn't working lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants