@@ -532,7 +532,7 @@ def create_embedding(self, input: str, model: Optional[str] = None) -> Embedding
532
532
An embedding object.
533
533
"""
534
534
assert self .ctx is not None
535
- _model : str = model if model is not None else self .model_path
535
+ model_name : str = model if model is not None else self .model_path
536
536
537
537
if self .params .embedding == False :
538
538
raise RuntimeError (
@@ -562,7 +562,7 @@ def create_embedding(self, input: str, model: Optional[str] = None) -> Embedding
562
562
"index" : 0 ,
563
563
}
564
564
],
565
- "model" : _model ,
565
+ "model" : model_name ,
566
566
"usage" : {
567
567
"prompt_tokens" : n_tokens ,
568
568
"total_tokens" : n_tokens ,
@@ -612,7 +612,7 @@ def _create_completion(
612
612
text : bytes = b""
613
613
returned_characters : int = 0
614
614
stop = stop if stop is not None else []
615
- _model : str = model if model is not None else self .model_path
615
+ model_name : str = model if model is not None else self .model_path
616
616
617
617
if self .verbose :
618
618
llama_cpp .llama_reset_timings (self .ctx )
@@ -711,7 +711,7 @@ def _create_completion(
711
711
"id" : completion_id ,
712
712
"object" : "text_completion" ,
713
713
"created" : created ,
714
- "model" : _model ,
714
+ "model" : model_name ,
715
715
"choices" : [
716
716
{
717
717
"text" : text [start :].decode ("utf-8" , errors = "ignore" ),
@@ -740,7 +740,7 @@ def _create_completion(
740
740
"id" : completion_id ,
741
741
"object" : "text_completion" ,
742
742
"created" : created ,
743
- "model" : _model ,
743
+ "model" : model_name ,
744
744
"choices" : [
745
745
{
746
746
"text" : text [returned_characters :].decode (
@@ -810,7 +810,7 @@ def _create_completion(
810
810
"id" : completion_id ,
811
811
"object" : "text_completion" ,
812
812
"created" : created ,
813
- "model" : _model ,
813
+ "model" : model_name ,
814
814
"choices" : [
815
815
{
816
816
"text" : text_str ,
0 commit comments