Skip to content

Commit

Permalink
add email and uri to bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
sky-2002 authored and torymur committed Dec 20, 2024
1 parent 346798c commit 78eb908
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/outlines_core/fsm/json_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
BOOLEAN,
DATE,
DATE_TIME,
EMAIL,
INTEGER,
NULL,
NUMBER,
STRING,
STRING_INNER,
TIME,
URI,
UUID,
WHITESPACE,
build_regex_from_schema,
Expand Down
2 changes: 2 additions & 0 deletions python/outlines_core/fsm/outlines_core_rs.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ STRING_INNER: str
TIME: str
UUID: str
WHITESPACE: str
EMAIL: str
URI: str

class Vocabulary:
"""
Expand Down
2 changes: 2 additions & 0 deletions src/python_bindings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ fn outlines_core_rs(m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add("TIME", json_schema::TIME)?;
m.add("UUID", json_schema::UUID)?;
m.add("WHITESPACE", json_schema::WHITESPACE)?;
m.add("EMAIL", json_schema::EMAIL)?;
m.add("URI", json_schema::URI)?;

m.add_function(wrap_pyfunction!(build_regex_from_schema_py, m)?)?;
m.add_function(wrap_pyfunction!(to_regex_py, m)?)?;
Expand Down

0 comments on commit 78eb908

Please sign in to comment.