fix: Remove trailing whitespace for pre-commit linting

This commit is contained in:
Yasiru Rangana 2025-10-09 15:01:53 +11:00
parent ec40b17eea
commit ae9f4ae73f

View file

@ -610,14 +610,14 @@ async def openai_embed(
response = await openai_async_client.embeddings.create(
model=model, input=texts, encoding_format="base64"
)
if token_tracker and hasattr(response, "usage"):
token_counts = {
"prompt_tokens": getattr(response.usage, "prompt_tokens", 0),
"total_tokens": getattr(response.usage, "total_tokens", 0),
}
token_tracker.add_usage(token_counts)
return np.array(
[
np.array(dp.embedding, dtype=np.float32)