sessions/next24/books-genai-vertex-springai/src/main/java/services/web/DocumentEmbeddingController.java [109:129]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public ResponseEntity<String> receiveMessageTransform(
          @RequestBody Map<String, Object> body, @RequestHeader Map<String, String> headers) {
    String errorMsg = RequestValidationUtility.validateRequest(body,headers);
    if (!errorMsg.isBlank()) {
      return new ResponseEntity<>(errorMsg, HttpStatus.BAD_REQUEST);
    }

    // get document name and bucket
    String fileName = (String) body.get("name");
    String bucketName = (String) body.get("bucket");

    logger.info("New script to transform:" + fileName);

    // read file from Cloud Storage
    BufferedReader br = cloudStorageService.readFile(bucketName, fileName);

    String response = tfTransform(br.toString());

    // success
    return new ResponseEntity<>(response, HttpStatus.OK);
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



sessions/next24/books-genai-vertex-langchain4j/src/main/java/services/web/DocumentEmbeddingController.java [107:127]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public ResponseEntity<String> receiveMessageTransform(
          @RequestBody Map<String, Object> body, @RequestHeader Map<String, String> headers) {
    String errorMsg = RequestValidationUtility.validateRequest(body,headers);
    if (!errorMsg.isBlank()) {
      return new ResponseEntity<>(errorMsg, HttpStatus.BAD_REQUEST);
    }

    // get document name and bucket
    String fileName = (String) body.get("name");
    String bucketName = (String) body.get("bucket");

    logger.info("New script to transform:" + fileName);

    // read file from Cloud Storage
    BufferedReader br = cloudStorageService.readFile(bucketName, fileName);

    String response = tfTransform(br.toString());

    // success
    return new ResponseEntity<>(response, HttpStatus.OK);
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



sessions/fall24/books-genai-vertex-langchain4j/src/main/java/services/web/DocumentEmbeddingController.java [107:127]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public ResponseEntity<String> receiveMessageTransform(
          @RequestBody Map<String, Object> body, @RequestHeader Map<String, String> headers) {
    String errorMsg = RequestValidationUtility.validateRequest(body,headers);
    if (!errorMsg.isBlank()) {
      return new ResponseEntity<>(errorMsg, HttpStatus.BAD_REQUEST);
    }

    // get document name and bucket
    String fileName = (String) body.get("name");
    String bucketName = (String) body.get("bucket");

    logger.info("New script to transform:" + fileName);

    // read file from Cloud Storage
    BufferedReader br = cloudStorageService.readFile(bucketName, fileName);

    String response = tfTransform(br.toString());

    // success
    return new ResponseEntity<>(response, HttpStatus.OK);
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



