Skip to content

Commit

Permalink
Working stable release!
Browse files Browse the repository at this point in the history
  • Loading branch information
unaidedelf8777 committed May 7, 2024
1 parent 6009a5a commit d9701a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions function_sampler/fsm/fsm_utils/src/lazy_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ impl LazyFSMIndex {
#[pymethods]
impl LazyFSMIndex {


pub fn get_state_map(&self, state: u32) -> Option<BTreeMap<u32, u32>> {
if let Some(token_map) = self.states_to_token_maps.get(&state) {
return Some(token_map.clone());
Expand Down
2 changes: 0 additions & 2 deletions function_sampler/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,6 @@ def __call__(
self.fsm_state = self.fsm.next_state(
self.fsm_state, int(last_token)
)
if self.fsm_state == -1:
raise Exception("Final state achieved")
allowed_tokens = self.fsm.allowed_token_ids(self.fsm_state)

if allowed_tokens == [-2]:
Expand Down

0 comments on commit d9701a6

Please sign in to comment.