(result)
| 78450 | function _getEmbeddingsSend(context, deploymentId, body, options = { requestOptions: {} }) { |
| 78451 | return context.path("/deployments/{deploymentId}/embeddings", deploymentId).post(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { body: { |
| 78452 | user: body["user"], |
| 78453 | model: body["model"], |
| 78454 | input: body["input"], |
| 78455 | dimensions: body["dimensions"] |
| 78456 | } })); |
| 78457 | } |
| 78458 | async function _getEmbeddingsDeserialize(result) { |
| 78459 | if (isUnexpected(result)) { |
| 78460 | throw result.body.error; |
| 78461 | } |
| 78462 | return { |
| 78463 | data: result.body["data"].map((p4) => ({ |
| 78464 | embedding: p4["embedding"], |
| 78465 | index: p4["index"] |
| 78466 | })), |
| 78467 | usage: { |
| 78468 | promptTokens: result.body.usage["prompt_tokens"], |
| 78469 | totalTokens: result.body.usage["total_tokens"] |
no test coverage detected
searching dependent graphs…