docs: backfill env template and migration notes for M2
This commit is contained in:
@@ -158,7 +158,9 @@ class EmbeddingClient:
|
||||
outcomes = []
|
||||
for start in range(0, len(texts), self._batch_size):
|
||||
outcomes.append(
|
||||
await self._embed_batch(texts[start : start + self._batch_size], session_id, parent_call_id)
|
||||
await self._embed_batch(
|
||||
texts[start : start + self._batch_size], session_id, parent_call_id
|
||||
)
|
||||
)
|
||||
return self._merge(outcomes)
|
||||
|
||||
@@ -394,9 +396,7 @@ class EmbeddingClient:
|
||||
def _total_cost(self, outcomes: list[_BatchOutcome]) -> float | None:
|
||||
if self._pricing is None:
|
||||
return None
|
||||
costs = [
|
||||
self._pricing.cost(o.source.model, o.result.prompt_tokens, 0) for o in outcomes
|
||||
]
|
||||
costs = [self._pricing.cost(o.source.model, o.result.prompt_tokens, 0) for o in outcomes]
|
||||
known = [c for c in costs if c is not None]
|
||||
return sum(known) if known else None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user