Skip to content

Commit

Permalink
Merge pull request #586 from guidance-ai/client-server
Browse files Browse the repository at this point in the history
Allow client/server guidance execution
  • Loading branch information
slundberg authored Jan 31, 2024
2 parents d36601b + 4da011f commit 513966f
Show file tree
Hide file tree
Showing 33 changed files with 2,315 additions and 1,562 deletions.
5 changes: 3 additions & 2 deletions guidance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
import requests

from . import models
from ._grammar import (Placeholder, StatefulFunction, StatelessFunction,
from ._grammar import (Placeholder, RawFunction, GrammarFunction,
Terminal, replace_grammar_node, string)
from ._utils import load, strip_multiline_string_indents
from ._server import Server

curr_module = sys.modules[__name__]

Expand Down Expand Up @@ -78,7 +79,7 @@ def wrapped(*args, **kwargs):

# otherwise must be stateful (which means we can't be inside a select() call)
else:
return StatefulFunction(f, args, kwargs)
return RawFunction(f, args, kwargs)

# attach this as a method of the model class (if given)
# if model is not None:
Expand Down
Loading

0 comments on commit 513966f

Please sign in to comment.