mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
[BUG] Regular expressions containing escapes cause ResponseErrors #280
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jack5github on GitHub (Jul 16, 2025).
Ollama (version 0.9.6) Python library (version 0.5.1) throws
ResponseError('Failed to create new sequence: unable to create sampling context\n')when attempting to use regular expressions that contain escapes. Code proving the error can be found below:@ParthSareen commented on GitHub (Jul 22, 2025):
Hey @jack5github! We don't support regex as fields - although the error should be improved to communicate that