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 gpt o-series code block formatting #4089

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

evan-danswer
Copy link
Contributor

Description

Addresses https://linear.app/danswer/issue/DAN-1479/gpt-o-series-code-blocks

Added to the default system prompt construction to tell the model to use markdown code blocks. To get o3 mini to work, I had to explicitly specify the use of backticks

How Has This Been Tested?

Tested in UI; without the changes Our code block parser often gets some of it right but misses parts that lead to unreadable code and comments that are interpreted as markdown headings.

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)
  • [Optional] Override Linear Check

Copy link

vercel bot commented Feb 21, 2025

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

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2025 11:09pm

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

Successfully merging this pull request may close these issues.

1 participant