public FastChatEmbeddingResponse embeddings(FastChatEmbedding embedding) {
        try {
            ObjectMapper mapper = new ObjectMapper();
            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
            String requestBody = mapper.writeValueAsString(embedding);
            Request request = new Request.Builder()
                    .url(this.apiHost + "v1/embeddings")
                    .post(RequestBody.create(MediaType.parse(ContentType.JSON.getValue()), requestBody))
                    .build();

            FastChatEmbeddingResponse chatEmbeddingResponse = null;
            Response response = this.okHttpClient.newCall(request).execute();
            if (response.isSuccessful()) {
                String body = response.body().string();
                chatEmbeddingResponse = mapper.readValue(body, FastChatEmbeddingResponse.class);
            }
            log.info("finish invoking chat embedding");
            return chatEmbeddingResponse;
        } catch (Exception e) {
            log.error("chat ai error", e);
            throw new ParamBusinessException();
        }
    }
Creates an embedding vector representing the input text.

@param embedding
@return EmbeddingResponse
chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/controller/ai/chat2db/client/Chat2DBAIStreamClient.java