This is the code from the example. But it returns an error “ValueError: too many values to unpack (expected 1)”. Why?
Code:
from vllm import LLM
llm = LLM(model=“intfloat/e5-mistral-7b-instruct”, task=“embed”)
prompts = [
“Hello, my name is”,
“The president of the United States is”,
“The capital of France is”,
“The future of AI is”,
]
(output,) = llm.embed(prompts)
embeds = output.outputs.embedding
print(f"Embeddings: {embeds!r} (size={len(embeds)})")