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

Method next_token

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

Source from the content-addressed store, hash-verified

51 }
52
53 async fn next_token(&mut self, index: usize) -> Result<Token> {
54 if self.base.generated == 0 {
55 let dialog = self.history.encode_dialog_to_prompt();
56 self.base.prepare_prompt(&dialog)?;
57 }
58 self.base.next_token(index).await
59 }
60
61 fn generated_tokens(&self) -> usize {
62 self.base.generated

Callers

nothing calls this directly

Calls 2

prepare_promptMethod · 0.80

Tested by

no test coverage detected