From 9fac0334b22553d069da87d8a29382ee2dafd0d7 Mon Sep 17 00:00:00 2001 From: Andrei Betlen Date: Sat, 1 Apr 2023 13:02:51 -0400 Subject: [PATCH] Update embedding example to new api --- examples/high_level_api_embedding.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/high_level_api_embedding.py b/examples/high_level_api_embedding.py index 9b10f7f..8d783f7 100644 --- a/examples/high_level_api_embedding.py +++ b/examples/high_level_api_embedding.py @@ -1,4 +1,3 @@ -import json import argparse from llama_cpp import Llama @@ -9,4 +8,4 @@ args = parser.parse_args() llm = Llama(model_path=args.model, embedding=True) -print(llm.embed("Hello world!")) +print(llm.create_embedding("Hello world!"))