MCPcopy Index your code
hub / github.com/SakuraLLM/SakuraLLM / completion

Method completion

utils/model.py:283–295  ·  view source on GitHub ↗
(self, prompt: str, generation_config: GenerationConfig,
                   is_print_speed: bool = True)

Source from the content-addressed store, hash-verified

281 return max(self.cfg.text_length, length)
282
283 def completion(self, prompt: str, generation_config: GenerationConfig,
284 is_print_speed: bool = True) -> ModelResponse:
285 log_generation_config(generation_config)
286
287 output = self.__get_model_response(
288 self.model,
289 self.tokenizer,
290 prompt,
291 self.cfg.model_version,
292 generation_config,
293 is_print_speed)
294
295 return output
296
297 def completion_stream(self, messages: list[dict[str, str]], generation_config: GenerationConfig,
298 is_print_speed: bool = True) -> ModelResponse:

Callers 4

test_loadedMethod · 0.95
get_model_responseFunction · 0.80
get_outputFunction · 0.80
get_outputFunction · 0.80

Calls 2

__get_model_responseMethod · 0.95
log_generation_configFunction · 0.90

Tested by 1

test_loadedMethod · 0.76