mirror of
https://github.com/abetlen/llama-cpp-python.git
synced 2023-09-07 17:34:22 +03:00
Remove model_name param
This commit is contained in:
@@ -16,10 +16,8 @@ class Llama:
|
|||||||
logits_all: bool = False,
|
logits_all: bool = False,
|
||||||
vocab_only: bool = False,
|
vocab_only: bool = False,
|
||||||
n_threads: Optional[int] = None,
|
n_threads: Optional[int] = None,
|
||||||
model_name: Optional[str]=None,
|
|
||||||
):
|
):
|
||||||
self.model_path = model_path
|
self.model_path = model_path
|
||||||
self.model = model_name or model_path
|
|
||||||
|
|
||||||
self.params = llama_cpp.llama_context_default_params()
|
self.params = llama_cpp.llama_context_default_params()
|
||||||
self.params.n_ctx = n_ctx
|
self.params.n_ctx = n_ctx
|
||||||
@@ -122,7 +120,7 @@ class Llama:
|
|||||||
"id": f"cmpl-{str(uuid.uuid4())}", # Likely to change
|
"id": f"cmpl-{str(uuid.uuid4())}", # Likely to change
|
||||||
"object": "text_completion",
|
"object": "text_completion",
|
||||||
"created": int(time.time()),
|
"created": int(time.time()),
|
||||||
"model": self.model, # Likely to change
|
"model": self.model_path,
|
||||||
"choices": [
|
"choices": [
|
||||||
{
|
{
|
||||||
"text": text,
|
"text": text,
|
||||||
|
|||||||
Reference in New Issue
Block a user