mirror of
https://github.com/abetlen/llama-cpp-python.git
synced 2023-09-07 17:34:22 +03:00
Update embedding example to new api
This commit is contained in:
@@ -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!"))
|
||||
|
||||
Reference in New Issue
Block a user