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

[stable4.3] Fix: Remove extraneous JSON preamble from LLM responses #10968

Draft
wants to merge 2 commits into
base: stable4.3
Choose a base branch
from

Conversation

backportbot[bot]
Copy link

@backportbot backportbot bot commented Apr 4, 2025

Backport of #10966

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

sto-j and others added 2 commits April 4, 2025 13:44
The most of the LLM's return in JSON markdown format, example:
```json
{
  "reply1": "Received, thanks...",
  "reply2": "Thanks for forwarding this..."
}
```
Adding additional instructions did't help. 

This is solution to strip:
```json
```
from the answer. 

Signed-off-by: sto-j <[email protected]>
@backportbot backportbot bot requested review from ChristophWurst and hamza221 April 4, 2025 13:44
@backportbot backportbot bot added this to the v4.3.0 milestone Apr 4, 2025
@ChristophWurst
Copy link
Member

tests got lost

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants