Skip to content

Commit

Permalink
Added missing return types to .pyi file
Browse files Browse the repository at this point in the history
  • Loading branch information
kc611 committed Oct 23, 2024
1 parent 74fd6d6 commit 6429394
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/outlines_core/fsm/outlines_core_rs.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,22 @@ class Vocabulary:
...

class Index:
def get_allowed_tokens(self, state: int):
def get_allowed_tokens(self, state: int) -> List[int]:
"""
Return the next instruction for guided generation.
"""
...
def get_next_state(self, state: int, token_id: int):
def get_next_state(self, state: int, token_id: int) -> Optional[int]:
"""
Update the state of the guide.
"""
...
def is_final_state(self, state: int):
def is_final_state(self, state: int) -> bool:
"""Determine whether the current state of the guide is a final state."""
...
def get_index_dict(self):
def get_index_dict(self) -> Dict[int, Dict[int, int]]:
"""Returns the Index as a Python Dict object."""
...
def get_initial_state(self):
def get_initial_state(self) -> int:
"""Returns the ID of the initial state of the input FSM automata."""
...

0 comments on commit 6429394

Please sign in to comment.