Class SketchfabConnector

java.lang.Object
org.vrspace.server.connect.SketchfabConnector

@Component public class SketchfabConnector extends Object
  • Field Details

  • Constructor Details

    • SketchfabConnector

      public SketchfabConnector()
  • Method Details

    • searchModels

      public ModelSearchResponse searchModels(ModelSearchRequest params, Consumer<GltfModel> postProcess) throws IOException, InterruptedException
      Issue sketchfab API search request, then process and return results. Creates new GltfModel if it does not exist, and stores it to the local database. If it does exist, returns that description instead of sketchfab description. Because sketchfab descriptions rarely describe the model, and Ollama generated the model description from the screenshot. Before returning, passes the GltfModel to postProcess function.
      Parameters:
      params - Search request with keywords and other search parameters.
      postProcess - Optional function performing image post-processing, i.e. generates model description with Ollama.
      Returns:
      sketchfab search results enriched
      Throws:
      IOException - on network error
      InterruptedException - on shutdown
    • updateCategory

      public ContentCategory updateCategory(String catName)