private void saveTableEmbedding(String tableSchema, TableSchemaRequest tableSchemaRequest) throws Exception{
        List<String> schemaList = Lists.newArrayList(tableSchema);
        tableSchemaRequest.setSchemaList(schemaList);

        List<List<BigDecimal>> contentVector = new ArrayList<>();
        for(String str : schemaList){
            // request embedding
            FastChatEmbeddingResponse response = distributeAIEmbedding(str);
            if(response == null){
                throw new ParamBusinessException();
            }
            contentVector.add(response.getData().get(0).getEmbedding());
        }
        if (CollectionUtils.isEmpty(contentVector)) {
            throw new ParamBusinessException();
        }
        tableSchemaRequest.setSchemaVector(contentVector);

        // save table embedding
        gatewayClientService.schemaVectorSave(tableSchemaRequest);
    }
save table embedding

@param tableSchema
@param tableSchemaRequest
@throws Exception
chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/controller/ai/EmbeddingController.java