mirror of https://github.com/ollama/ollama.git
Right now we deserialize tool call definitions' arguments into golang maps. These purposefully don't have a predictable iteration order, whereas we want to maintain the order the user originally provided. Unstable rendering of arguments means that we break the kv cache, which this change fixes. There's no way to build this in a fully backwards compatible way when executing existing templates exactly as they are. We get around this by rewriting templates dynamically just before they're rendered. This is fragile, but perhaps the least bad option? |
||
---|---|---|
.. | ||
openai.go | ||
openai_test.go |