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

Method next_token

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

prepare_promptMethod · 0.80

Tested by

no test coverage detected