(prompt, stop, grammar)
| 2106 | return grammar |
| 2107 | |
| 2108 | def create_completion(prompt, stop, grammar): |
| 2109 | completion = cast( |
| 2110 | llama_types.Completion, |
| 2111 | llama.create_completion( |
| 2112 | prompt=prompt, |
| 2113 | temperature=temperature, |
| 2114 | top_p=top_p, |
| 2115 | top_k=top_k, |
| 2116 | min_p=min_p, |
| 2117 | typical_p=typical_p, |
| 2118 | stream=stream, |
| 2119 | stop=stop, |
| 2120 | max_tokens=max_tokens, |
| 2121 | presence_penalty=presence_penalty, |
| 2122 | frequency_penalty=frequency_penalty, |
| 2123 | repeat_penalty=repeat_penalty, |
| 2124 | tfs_z=tfs_z, |
| 2125 | mirostat_mode=mirostat_mode, |
| 2126 | mirostat_tau=mirostat_tau, |
| 2127 | mirostat_eta=mirostat_eta, |
| 2128 | model=model, |
| 2129 | logits_processor=logits_processor, |
| 2130 | grammar=grammar, |
| 2131 | ), |
| 2132 | ) |
| 2133 | |
| 2134 | return completion |
| 2135 | |
| 2136 | content = "" |
| 2137 | function_calls, function_bodies = [], [] |
no test coverage detected
searching dependent graphs…