fix: Remove trailing whitespace for pre-commit linting
This commit is contained in:
parent
ec40b17eea
commit
ae9f4ae73f
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue