Unverified Commit 316a41ac authored by Chang Su's avatar Chang Su Committed by GitHub
Browse files

[Bugfix] Fix encoding_format in examples/openai_embedding_client.py (#6755)

parent 0310029a
......@@ -13,11 +13,14 @@ client = OpenAI(
models = client.models.list()
model = models.data[0].id
responses = client.embeddings.create(input=[
responses = client.embeddings.create(
input=[
"Hello my name is",
"The best thing about vLLM is that it supports many different models"
],
model=model)
],
model=model,
encoding_format="float",
)
for data in responses.data:
print(data.embedding) # list of float of len 4096
......@@ -18,7 +18,6 @@ def embedding_server():
"--enforce-eager",
"--max-model-len",
"8192",
"--enforce-eager",
]
with RemoteOpenAIServer(EMBEDDING_MODEL_NAME, args) as remote_server:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment