From c1dcde92b8561648bfa290426079e188d19242ba Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Fri, 10 May 2024 15:58:40 +0000 Subject: [PATCH] use Paul's branch of guidance for testing --- .gitmodules | 3 ++- Cargo.lock | 6 ------ controllers/guidance_ctrl/run_g.py | 7 +++++++ py/guidance | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.gitmodules b/.gitmodules index 19d98f10..809c9879 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,4 +10,5 @@ url = https://github.com/ggerganov/llama.cpp [submodule "py/guidance"] path = py/guidance - url = https://github.com/guidance-ai/guidance + url = https://github.com/paulbkoch/guidance + branch = pk-azure-guidance diff --git a/Cargo.lock b/Cargo.lock index 1a46f3f7..4f8d2787 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1492,13 +1492,7 @@ dependencies = [ name = "guidancerust" version = "0.1.0" dependencies = [ - "aici_abi", - "aici_guidance_ctrl", - "aici_native", - "anyhow", "pyo3", - "serde", - "serde_json", ] [[package]] diff --git a/controllers/guidance_ctrl/run_g.py b/controllers/guidance_ctrl/run_g.py index 783893eb..ba68c8e8 100644 --- a/controllers/guidance_ctrl/run_g.py +++ b/controllers/guidance_ctrl/run_g.py @@ -86,6 +86,13 @@ def main(): grm = "How much is 2 + 2? " + gen(name="test", max_tokens=10, regex=r"\(") grm = "red\n" + gen(stop="") + " and test2" + lm = "Here's a " + lm += select(['joke', 'poem'], name='type') + lm += ": " + lm += gen("words", regex=r"[A-Z ]+", stop="\n") + grm = lm + + # read current script file # with open(__file__) as f: # script = f.read() diff --git a/py/guidance b/py/guidance index e574c413..90b1993d 160000 --- a/py/guidance +++ b/py/guidance @@ -1 +1 @@ -Subproject commit e574c4136db590715bd8e0f7fa0925c0278e6cbd +Subproject commit 90b1993da71b6459756d20020c20762d1fb42594