[PR #8071] [MERGED] llama: parse JSON schema using nlohmann::ordered_json #43858

Closed
opened 2026-04-24 23:25:50 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/8071
Author: @iscy
Created: 12/12/2024
Status: Merged
Merged: 12/12/2024
Merged by: @ParthSareen

Base: mainHead: cpp-7978


📝 Commits (1)

  • 81f9810 llama: parse JSON schema using nlohmann::ordered_json

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 llama/sampling_ext.cpp (+1 -1)

📄 Description

PR #8002 has handled the JSON within Go to ensure we could keep the schema as-is, without affecting the order of the properties. However, when parsed within the cpp wrapper, nlohmann::json was used instead of relying on nlohmann::ordered_json. This PR simply changes the parser for the ordered one in order to maintain the order.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/8071 **Author:** [@iscy](https://github.com/iscy) **Created:** 12/12/2024 **Status:** ✅ Merged **Merged:** 12/12/2024 **Merged by:** [@ParthSareen](https://github.com/ParthSareen) **Base:** `main` ← **Head:** `cpp-7978` --- ### 📝 Commits (1) - [`81f9810`](https://github.com/ollama/ollama/commit/81f9810296929c039d6a1c49c5ee3fbe9b00139e) llama: parse JSON schema using nlohmann::ordered_json ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `llama/sampling_ext.cpp` (+1 -1) </details> ### 📄 Description PR #8002 has handled the JSON within Go to ensure we could keep the schema as-is, without affecting the order of the properties. However, when parsed within the cpp wrapper, `nlohmann::json` was used instead of relying on `nlohmann::ordered_json`. This PR simply changes the parser for the ordered one in order to maintain the order. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-24 23:25:50 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#43858