mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-11-04 09:32:00 +00:00 
			
		
		
		
	* py : switch to snake_case ggml-ci * cont ggml-ci * cont ggml-ci * cont : fix link * gguf-py : use snake_case in scripts entrypoint export * py : rename requirements for convert_legacy_llama.py Needed for scripts/check-requirements.sh --------- Co-authored-by: Francis Couture-Harpin <git@compilade.net>
		
			
				
	
	
		
			21 lines
		
	
	
		
			431 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			431 B
		
	
	
	
		
			Python
		
	
	
	
	
	
import json, subprocess, sys, os
 | 
						|
 | 
						|
assert len(sys.argv) >= 2
 | 
						|
[_, pattern, *rest] = sys.argv
 | 
						|
 | 
						|
print(subprocess.check_output(
 | 
						|
    [
 | 
						|
        "python",
 | 
						|
        os.path.join(
 | 
						|
        os.path.dirname(os.path.realpath(__file__)),
 | 
						|
        "json_schema_to_grammar.py"),
 | 
						|
        *rest,
 | 
						|
        "-",
 | 
						|
        "--raw-pattern",
 | 
						|
    ],
 | 
						|
    text=True,
 | 
						|
    input=json.dumps({
 | 
						|
        "type": "string",
 | 
						|
        "pattern": pattern,
 | 
						|
    }, indent=2)))
 |