MCPcopy
hub / github.com/llmware-ai/llmware / completion

Method completion

llmware/prompts.py:722–731  ·  view source on GitHub ↗

Inference method - convenience method for a basic text completion.

(self, prompt, temperature=0.7, target_len=200)

Source from the content-addressed store, hash-verified

720 return response
721
722 def completion(self, prompt, temperature=0.7, target_len=200):
723
724 """ Inference method - convenience method for a basic text completion. """
725
726 self.llm_model.temperature = temperature
727 self.llm_model.ai_max_output_len = target_len
728
729 response = self.prompt_from_catalog(prompt, prompt_name="completion")
730
731 return response
732
733 def multiple_choice(self, prompt, context, choice_list):
734

Callers 4

test_openaiFunction · 0.95
test_googleFunction · 0.95
test_anthropicFunction · 0.95
test_ai21Function · 0.95

Calls 1

prompt_from_catalogMethod · 0.95

Tested by 4

test_openaiFunction · 0.76
test_googleFunction · 0.76
test_anthropicFunction · 0.76
test_ai21Function · 0.76