Update embedding example to new api

This commit is contained in:
Andrei Betlen 2023-04-01 13:02:51 -04:00
parent 5e011145c5
commit 9fac0334b2

View file

@ -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!"))