MCPcopy Create free account
hub / github.com/evilsocket/cake / next_token

Method next_token

cake-core/src/models/gemma3/model.rs:79–85  ·  view source on GitHub ↗
(&mut self, index: usize)

Source from the content-addressed store, hash-verified

77 }
78
79 async fn next_token(&mut self, index: usize) -> Result<Token> {
80 if self.base.generated == 0 {
81 let dialog = self.history.encode_dialog_to_prompt();
82 self.base.prepare_prompt(&dialog)?;
83 }
84 self.base.next_token(index).await
85 }
86
87 fn generated_tokens(&self) -> usize {
88 self.base.generated

Callers

nothing calls this directly

Calls 2

prepare_promptMethod · 0.80

Tested by

no test coverage detected